Opened 11 years ago

Last modified 11 years ago

#3507 closed Bug report

MKDIR result message interpretation

Reported by: o0verhaul Owned by: Tim Kosse
Priority: normal Component: FileZilla Client
Keywords: Cc: o0verhaul, Tim Kosse, Alexander Schuch
Component version: Operating system type:
Operating system version:

Description

I ran across an FTP server that responds in a way that FileZilla doesn't expect when MKDIR finds a directory that already exists. The response is:

517 <path>: File exists.

Change History (5)

comment:1 Changed 11 years ago by Alexander Schuch

Which version of FileZilla did you use? Can you provide a log file?

comment:2 Changed 11 years ago by o0verhaul

I used 3.0.9.2 when I discovered this difficulty.

Don't know about a log file, but here's the chatter between FileZilla and the server:
Status: Creating directory '/bin/'...
Command: CWD /
Response: 250 CWD command successful.
Command: MKD bin
Response: 517 bin: File exists.

comment:3 Changed 11 years ago by o0verhaul

Also crawling around through the source of the Kerberos GSSFTP daemon, it seems to return 550 instead of 517, but otherwise use the system-dependent error code lookup as its reason. Apparently Linux's and AIX's error string for mkdir is "File exists."

comment:4 Changed 11 years ago by Alexander Schuch

I am using Pure-FTPd and the log says the following:

Status: Creating directory '/web/template/'...
Command: MKD template
Response: 550 Can't create directory: File exists
Command: MKD /web/template/
Response: 550 Can't create directory: File exists

Not sure what to do with the 517 answer, as I do not know the FTP specification.

comment:5 Changed 11 years ago by Tim Kosse

The FTP specifications don't give any semantics to the error codes for MKD. Especially not to the human-readable string past the actual error code.
I've added some heuristics to guess what the server means but it can't possibly catch all replies imaginable.

Note: See TracTickets for help on using tickets.