RETR <Path>/file

Report bugs or issues with Core FTP Server here
Locked
ttrow
Posts: 2
Joined: Fri Mar 26, 2010 8:51 pm

RETR <Path>/file

Post by ttrow »

My interpretation of RFC 959 (and apparently the interpretation of many FTP server developers) is that the RETR command should be able to specify the path (absolute or relative) to a file.

RETR <SP> <pathname> <CRLF>

I can
CWD <path> then RETR <file>
but cannot RETR <path>/<file>

Even if I CWD <path> and specify the absolute path, I get the error
No such file or directory

Thanks for the assistance.
ttrow
Posts: 2
Joined: Fri Mar 26, 2010 8:51 pm

Post by ttrow »

Posted: Wed Jun 02, 2010 6:35 pm Post subject:

It seems this is fixed (at least in part.) Thanks!

When using a command line FTP client, on most FTP servers, the client command
get directory/file
will retrieve the file and put it in the the current working directory.

From my testing with the Core server, if the relative path 'directory' doesn't exist, the RETR fails.
To work-around this, I'm required to use the command
get /home/directory/file file

I'm not sure if the "destination" should be required.

---------------------------------------------------------------------------------

Build 349 has been applied. But if the destination filename isn't specified, it requires that the directory structure be the same for the local filesystem as on the FTP server. (identifying directory/filenames have been edited for security.)

ftp> dir /id/to_cust/test/file.20100528.gpg
200 PORT command successful
150 Opening ASCII mode data connection
-r-xr-xrwx 1 owner group 5755 Jun 15 09:10 file.20100528.gpg
ftp> get /id/to_cust/test/file.20100528.gpg
/id/to_cust/test/file.20100528.gpg: No such file or directory
ftp> pwd
257 "/id/" is current directory
ftp> get to_cust/test/file.20100528.gpg
to_alliant/test/file.20100528.gpg: No such file or directory
ftp> !mkdir to_cust
ftp> !mkdir to_cust/test
ftp> get to_cust/test/file.20100528.gpg
200 PORT command successful
150 RETR command started
226 Transfer Complete
5755 bytes received in 0.11 seconds (52.09 Kbytes/s)
ftp>
Locked