0

I am trying to access a directory on my Filezilla FTP server using the ftp command in Windows from a local computer on the network, and then put a list of all those files in the directory in a text file. I am getting an error opening the local file and Permission denied. These commands however work fine from the server hosting the ftp, and from any external computer not on the network. I just cannot get this to work from a computer on the network.

All firewall settings have been opened for Filezilla, FTP connections, passive FTP connections, and for all file transfers. I am finding that ftp.exe is hanging and locking the local file I am trying to write to. The following is an example of the script:

C:\>ftp ftpservice.dns.org
Connected to ftpservice.dns.org
220-FileZilla Server version 0.9.44 beta
220 Welcome to the FTPSERVICE FTP Server
User <ftpservice.dns.org:<none>>: user
331 Password required for user
Password:
230 Logged on
ftp> cd test
250 CWD successful. "/test" is current directory.
ftp> ls *.tar "C:\Users\Public\Software\Temp\Files.txt"
200 Port command successful
Error opening local file C:\Users\Public\Software\Temp\Files.txt.
> C:\Users\Public\Software\Temp\Files.txt:Permission denied
ftp>

I am using a domain administrator account, ran the cmd as the administrator, and even gave permissions to these folders and files to everybody to have full control. I even gave the ownership of these files to the ftp user. If I try to delete or modify the above file after running these commands, I still get an access denied. I found that I have to terminate the ftp.exe file in the task manager to get access again.

This is only happening on this machine on the network. If I run the ls command without specifying a local file, it does list the files in the directory just fine. It is having an issue with this file for some reason.

Any ideas?

2
  • I hate to ask the stupid question, but ... are you sure that you have a C:\Users\Public\Software\Temp directory. It (and even C:\Users\Public\Software) don't exist by default; did you create them? And what happens if you type copy nul C:\Users\Public\Software\Temp\TestFile? Aug 8, 2014 at 0:03
  • Yes, the directory was created by myself. And I can edit the TestFile, and perform anything locally to it. I actually think that ftp.exe wasn't releasing the file. I had to find alternatives to making this script work because the file was only able to be used and edited again if I went into the task manager and closed ftp.exe. Not sure why that is though. Aug 8, 2014 at 17:56

1 Answer 1

1

You wrote...

I am trying to access a directory on my Filezilla FTP server using the ftp command in Windows from a local computer on the network, and then put a list of all those files in the directory in a text file...

and:

All firewall settings have been opened for Filezilla, FTP connections, passive FTP connections, and for all file transfers. I am finding that ftp.exe is hanging and locking the local file I am trying to write to...

The example you provide works when I test it on my network (but I tried it with Windows FTP client) so I have to ask some more questions to narrow down what the issue is. It is obvious that you are connecting to the remote site and copying the listing to the local file. It appears as though you are using the FileZilla Server version 0.9.44 beta client from your example as well. I have not used the FileZilla client but file access issues should remain the same no matter what FTP client you are using since it boils down to the host operating system (I assume it is a Windows Server with the FileZilla client loaded on it - hence the "Filezilla FTP server" reference in your opening paragraph - is it Windows Server 2003/2008?). My other question to you is... Have you monitored the locks on your Files.txt file to see if there is more than one on the file when it hangs? You could be running into a deadlock situation. Let me know if you need more infomation on how to accomplish this. Thanks!

2
  • Feel free to finish up later as an answer, and flag for a re-opening. Don't forget, your answers are usually kept stored on your account even when unposted and IIRC follow you between sessions. As is though, its sort of hanging there.
    – Journeyman Geek
    Aug 8, 2014 at 2:50
  • I believe that there was some locks on the file, but even when I closed the services and made sure the file wasn't locked anymore, I would try to access it with the FileZilla FTP client and the same issue would keep happening. Then the file would be locked again. And Actually, I was using Windows SBS 2012 at the time. So yes, the file was getting locked, but locked after trying to access it with the FTP client. Still never figured this out, but it eventually just started working later. Not sure why. It isn't an issue anymore. Jan 7, 2016 at 16:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .