FTP Commands: CWD, CDUP, PWD, RMD, DELE, SMNT, SITE
CWD FTP command
The CWD command is issued to change the client’s current working directory to the path specified with the command. FTP Voyager and other GUI-based FTP clients will automatically issue these commands as the user browses the remote file system from within the program.
Common responses:
CDUP FTP command
The CDUP command causes the server to change the client’s current working directory to the immediate parent directory of the current working directory. For example, if a client’s current working directory is /usr/files, issuing the CDUP command will change the working directory to /usr.
Common responses:
PWD FTP command
RMD FTP command
This command causes the directory specified in the path name to be removed. If a relative path is provided, the server assumes the specified directory to be a subdirectory of the client’s current working directory. To delete a file, the DELE command is used.
Common responses:
DELE FTP command
SMNT FTP command
The SMNT command allows the user to mount a different file system data structure without altering their login or accounting information. Transfer parameters are similarly unchanged. The argument is a path name specifying a directory or other system dependent file group designator.
Common responses:
SITE FTP command
The SITE command is used by the server to provide services to a client that may not be universally supported by all FTP clients. These commands are commonly server specific implementations provided to allow for additional functionality to FTP clients choosing to implement the command as well. The SITE command is followed by the extended command and any additional parameters. Serv-U supports the following SITE parameters:
- CHMOD – The SITE CHMOD command specifies new permissions for a specified file or directory. It is issued in the format SITE CHMOD XYZ, where X is the file/folder owner’s permissions, Y is the file/folder’s assigned group’s permissions, and Z is the file/folder permissions assigned to all other users. The octal value assigned to each place is determined by using the following values:
- 1 – Execute
- 2 – Write
- 4 – Read
By adding values together, the values for each place are found. For example, 644 grants Read/Write (4+2) permissions to the owner, but only Read (4) permissions to the file group and all other users.
- EXEC – The SITE EXEC (Execute) command executes the provided executable on the server. In circumstances requiring remote execution of batch files or other executables before or after transfers, administrators may create a Directory Access rule that grants Execute access to a .bat or .exe file, enabling certain users to run the file while connected. Because of the nature of remote execution, this privilege can easily be abused, so it is advised that users only be granted this permission to individual files on a need-only basis.
- HELP – The SITE HELP command is used to request information on a specific FTP command as implemented by the server. It is primarily made available for users with command-line clients who are entering commands manually or setting up file transfer scripts.
- INDEX – The SITE INDEX command requests a recursive listing of all files and directories in the specified path delivered over the command channel, as opposed to the data channel where directory listings are normally performed.
- MSG – The SITE MSG (Message) command sends the provided text message to the server administrator. It is used for client to administrator chat, and most fully featured FTP clients will provide a chat window when this type of chat session is started, removing the need to issue this command manually.
- PSWD – The SITE PSWD (Password) command changes the logged in user’s password to the provided password.
- SET – The SITE SET command sets the site-specific option specified in the command to the provided value.
- ZONE – The SITE ZONE command requests the UTF offset for the time zone in which the server is located, allowing some FTP clients to adjust file timestamps to reflect different source/destination time zones.
Common responses:
Serv-U Managed File Transfer Server
Let’s talk it over.
Contact our team. Anytime.