This article explains the use of FTP commands: CWD, CDUP, PWD, RMD, DELE, SMNT, SITE
All Serv-U versions
CWD FTP command
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.
CDUP FTP command
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
PWD FTP command
This command displays the current working directory on the server for the logged in user.
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.
DELE FTP command
DELE command is used to delete the specified file from the server. To delete a directory, use the
SMNT FTP command
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.
SITE FTP command
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
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:
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.
- 1 - Execute
- 2 - Write
- 4 - Read
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.