1 - RFC



 2 - FTP Commands


Here is the list of supported FTP commands in Gene6 FTP Server.


ABOR

Abort current transfer operation.

Server replies:

  • 226 ABOR command successful.



ALLO size

Return if client can store size bytes on server.

Server replies:

  • 200 ALLO Ok : %d bytes available.
  • 501 Insufficient disk space : only %d bytes available.
  • 501 Required size parameter bad or missing.



APPE pathname

Resume transfer of a file with name pathname.

Server replies:

  • 200 Ready to append file "%s" at offset %d.
  • 501 Bad or missing parameters.
  • 521 Data connection cannot be opened with this PROT setting.
  • 550 No port specified.
  • 550 Cannot APPE. No permission.
  • 550 Cannot APPE. (file not found or busy)



AUTH SSL|TLS-P|TLS|TLS-C [RFC-2228]

Establish SSL encrypted session.

Server replies:

  • 234 AUTH command ok; starting SSL connection.
  • 431 AUTH service unavailable.
  • 431 Bad or missing parameters.
  • 534 AUTH command is disabled.


CCC

Clear Control Channel.

Server replies:

  • 200 Command okay.



CDUP

Change to parent directory.

Server replies:

  • 250 CWD command successful. "%s" is current directory.
  • 550 CWD failed. "%s" : no such file or directory.
  • 550 CWD failed. No permission.
  • 550 CWD failed. %s



CLNT clientname

Notify the client application name to the server.

Server replies:

  • 200 Noted.



CPSV

PASV command and set secured client negotiation for next transfer.

Server replies:

  • 227 Entering Passive Mode (xxx,xxx,xxx,xxx,yyy,zzz).
  • 501 PASV not allowed.
  • 501 PASV exception: "Please try again later.".



CWD pathname

Change current directory to pathname.

Server replies:


  • 250 CWD command successful. "%s" is current directory.
  • 550 CWD failed. "%s" : no such file or directory.
  • 550 CWD failed. No permission.
  • 550 CWD failed. %s



DELE pathname

Delete file pathname.

Server replies:


  • 250 File "%s" deleted.
  • 450 File "%s" can't be deleted.
  • 550 "%s": no such file.
  • 550 Cannot DELE. No permission.



EPRT |net-prt|net-addr|tcp-port| [RFC-2428]
(sample : EPRT |1|132.235.1.2|6275|)

Setup data port.

Server replies:


  • 200 Port command successful.
  • 501 Invalid PORT command.
  • 501 Bad or missing parameters.
  • 504 Command not implemented for the specified argument.
  • 522 Network protocol not supported, use (%s)



EPSV net-prt [RFC-2428]

Setup data port.

Server replies:


  • 229 Entering Extended Passive Mode (%s)
  • 501 PASV not allowed.
  • 501 PASV exception: "Please try again later.".
  • 522 Network protocol not supported, use (%s)



FEAT [RFC-2389]

Reply FEAT commands.

Server replies:



  • 211-Extensions supported:
    AUTH TLS
    CCC
    CLNT
    CPSV
    EPRT
    EPSV
    MDTM
    MLST type*;size*;created;modify*;
    MODE Z
    PASV
    PBSZ
    PROT
    REST STREAM
    SIZE
    SSCN
    TVFS
    UTF8
    XCRC "filename" SP EP
    XMD5 "filename" SP EP
    211 End.



HELP

Reply help.

Server replies:



  • 214-Supported Commands : (* unimplemented)
    ABOR FEAT PASS RMD STOU* XMD5
    ACCT* HELP PASV RNFR STRU XMKD
    ALLO LIST PORT RNTO SYST XPWD
    APPE MDTM PWD SITE TYPE XRMD
    CDUP MKD QUIT SIZE USER
    CLNT MODE REIN SMNT* XCRC
    CWD NLST REST STAT XCUP
    DELE NOOP RETR STOR XDEL
    SITE PSWD
    SITE ZONE
    214 End.



LIST [sp pathname]

List folder.

Server replies:


  • 150 Data connection accepted from %s:%d; transfer starting.
  • 150 Opening data connection for directory list.
  • 550 No port specified.



MDTM [YYYYmmDDhhMMss] pathname

Change/retrieve modification date of file pathname.

Server replies:


  • 213 %s
  • 501 Bad or missing parameters.
  • 550 "%s" : can''t change date/time. No permission.
  • 550 "%s" : no such file or directory.



MKD pathname

Create directory pathname.

Server replies:


  • 257 "%s": directory created.
  • 501 Bad or missing parameters.
  • 550 "%s": file or directory already exists.
  • 550 "%s": can't create directory.
  • 550 "%s": can't create directory. No permission.



MLSD [pathname]

List folder.

Server replies:


  • 150 Data connection accepted from %s:%d; transfer starting.
  • 150 Opening data connection for directory list.
  • 550 No port specified.



MLST [pathname]

Retrieve current file status.

Server replies:


  • (example)
    250-Begin
    type=dir;modify=19990930152225; /
    250 End.
  • 550 Permission denied.



MODE mode

Set file transfer mode.

Server replies:


  • 200 Mode %s ok.
  • 501 Bad or missing parameters.
  • 504 Command not implemented for the specified argument.



NLST

List folder.

Server replies:


  • 150 Data connection accepted from %s:%d; transfer starting.
  • 150 Opening data connection for directory list.
  • 550 No port specified.



NOOP

No operation command.

Server replies:


  • 200 NOOP command successful.



OPTS [RFC-2389]

Set options for a command.

Server replies:


  • 200 %s OPTS %s
  • 501 Unknown option.
  • 501 Invalid %s options.



PASS password

Send password.

Server replies:


  • 230 User %s logged in.
  • 421 Can't login : invalid Home Directory.
  • 421 Not logged in, account expired.
  • 421 Service not available, closing control connection.
  • 421 Too many users logged for this account. Try again later.
  • 421 Not logged in, access denied.
  • 421 No more connection allowed for this IP.
  • 421 Login or Password incorrect.
  • 501 Bad or missing parameters.
  • 503 Login with USER first.



PASV

pasv command.

Server replies:


  • 227 Entering Passive Mode (xxx,xxx,xxx,xxx,yyy,zzz).
  • 501 PASV not allowed.
  • 501 PASV exception: "Please try again later.".



PBSZ 0

Set protection buffer size.

Server replies:


  • 200 PBSZ=0
  • 501 Bad or missing parameters.
  • 503 Security data exchange not yet completed.



PORT host-port
(sample : PORT 192,168,0,1,4,0)

Setup data port.

Server replies:


  • 200 Port command successful.
  • 501 Invalid PORT command.
  • 501 Bad or missing parameters.
  • 504 Command not implemented for the specified argument.



PROT mode

Set Protocol for the data transfer.
Mode can be either 'C', 'P', 'S', 'E'. If mode is 'P' then data transfer is private.

Server replies:


  • 200 PROT command successful.
  • 504 Command not implemented for the specified argument.



PWD

Print working directory.

Server replies:


  • 257 "%s" is current directory.



QUIT

End client session and close connection.

Server replies:


  • 221 Goodbye.



REIN

Allow client to relogin. For simplicity, client must disconnect.

Server replies:


  • 502 Disconnect first to re-login.



REST position

Restart next transfer operation at position.

Server replies:


  • 200 Restarting at %d. Send STORE or RETRIEVE.
  • 501 Required byte offset parameter bad or missing.



RETR pathname

Retrieve file pathname.

Server replies:


  • 150 Opening data connection for %s (%d bytes).
  • 501 Bad or missing parameters.
  • 521 Data connection cannot be opened with this PROT setting.
  • 550 "%s": No Such File.
  • 550 Cannot retrieve.
  • 550 Cannot RETR. Not enough credit.
  • 550 Cannot RETR. No permission.
  • 550 No port specified.



RMD pathname

Remove directory pathname.

Server replies:


  • 200 "%s": directory removed.
  • 501 Bad or missing parameters.
  • 550 "%s": no such directory.
  • 550 "%s": can't remove directory. No permission.
  • 550 "%s": "%s": can't remove directory. %s



RNFR pathname

Begin a rename/move on file/directory pathname.

Server replies:


  • 350 File exists, ready for destination name.
  • 501 Bad or missing parameters.
  • 550 Cannot RNFR. No permission.
  • 550 "%s": no such file or directory.



RNTO pathname

Rename/move on file/directory pathname.

Server replies:


  • 250 File "%s" renamed to "%s".
  • 501 Bad or missing parameters.
  • 503 Bad sequence of commands.
  • 550 File "%s" can't be renamed.
  • 550 "%s": no such file or directory.



SITE MSG message

Send a message to admin.

Server replies:


  • 200 Message sent to administrator.



SITE PSWD oldpassword newpassword

Change the account password.

Server replies:


  • 200 Password change successful.
  • 501 Password not changed. No permission.
  • 501 Password not changed. Syntax : SITE PSWD
  • 501 Password not changed. Old password does not match.



SITE ZONE

Returns server time zone.

Server replies:


  • 200 +-timezone.



SIZE pathname

Display the size of file pathname.

Server replies:


  • 213 %d.
  • 501 Bad or missing parameters.
  • 550 No such file or directory.
  • 550 Command failed: %s.



SMNT pathname

This command allows the user to mount a different file system data structure without altering his login or accounting information. Transfer parameters are similarly unchanged. The argument is a pathname specifying a directory or other system dependent file group designator.
This command is not supported.

Server replies:


  • 202 SMNT : Command not implemented, superfluous at this site.


SSCN ON/OFF

Set secured client negotiation.

Server replies:


  • 200 SSCN: Client method
  • 200 SSCN: Server method



STAT pathname

This command shall cause a status response to be sent over the control connection in the form of a reply.

Server replies:



  • 211-
    FTP Server status for :
    (client ip : client port <-> server ip : server port)
    Files Downloaded: 0
    Downloaded: 0 Bytes
    Files Uploaded: 0
    211 Uploaded: 0 Bytes



STOR pathname

Store file pathname.

Server replies:


  • 150 Opening data connection for %s.
  • 426 Insufficient Disk Quota. Transfer of "%s" Aborted.
  • 501 Bad or missing parameters.
  • 521 Data connection cannot be opened with this PROT setting.
  • 550 Cannot STOR. %s
  • 550 Cannot STOR. No permission.
  • 550 No port specified.



STOU

This command behaves like STOR except that the resultant file is to be created in the current directory under a name unique to that directory.

Server replies:


  • 502 STOU : Command not yet implemented.



STRU structure

The argument is a single Telnet character code specifying file structure described in the Section on Data Representation and Storage.
The following codes are assigned for structure:
F - File (no record structure)
R - Record structure
P - Page structure

The default structure is File.

Server replies:


  • 200 STRU F ok.
  • 501 Bad or missing parameters.
  • 504 Command not implemented for the specified argument.



SYST

Server replies:


  • 215 UNIX Type: L8



TYPE type

Server replies:


  • 200 Type set to %s.
  • 501 Bad or missing parameters.
  • 504 Command not implemented for the specified argument.



USER username

Server replies:


  • 331 Password required for %s.
  • 421 Too many users connected. Try again later.
  • 501 Bad or missing parameters.
  • 501 Disconnect first to re-login.
  • 501 Please AUTH first.



XCRC "filename" SP EP

Calculate the CRC32 of filename from SP to EP.
SP - Starting Point in bytes
EP - Ending Point in bytes

Server replies:


  • 250
  • 501 Bad or missing parameters.
  • 504 Command not implemented for the specified argument.



XCUP [RFC-775]

Change to parent directory.

Server replies:

  • 250 CWD command successful. "%s" is current directory.
  • 550 CWD failed. "%s" : no such file or directory.
  • 550 CWD failed. No permission.
  • 550 CWD failed. %s



XMD5 "filename" SP EP

Calculate the MD5 of filename from SP to EP.
SP - Starting Point in bytes
EP - Ending Point in bytes

Server replies:


  • 250
  • 501 Bad or missing parameters.
  • 504 Command not implemented for the specified argument.



XMKD pathname [RFC-775]

Create directory pathname.

Server replies:


  • 257 "%s": directory created.
  • 501 Bad or missing parameters.
  • 550 "%s": file or directory already exists.
  • 550 "%s": can't create directory.
  • 550 "%s": can't create directory. No permission.



XPWD [RFC-775]

Print current working directory

Server replies:


  • 257 "%s" is current directory.



XRMD pathname [RFC-775]

Remove directory pathname.

Server replies:


  • 200 "%s": directory removed.
  • 501 Bad or missing parameters.
  • 550 "%s": no such directory.
  • 550 "%s": can't remove directory. No permission.
  • 550 "%s": "%s": can't remove directory. %s

 3 - Frequent problems