Knowledge Base

Enter search queries below or use the tag links to the right to browse the knowledge base by category (Show All Tags).


How are file permissions on a Linux/Unix FTP server changed using Robo-FTP?

File permissions cannot be changed directly with a dedicated Robo-FTP script command but it is still possible. The FTPCMD script command allows "raw", user-specified FTP commands to be sent to the server; the "raw" FTP command SITE (see RFC959) allows native FTP site commands (in this case Unix shell commands) to be run on the server (it should be noted that not all FTP servers support the SITE command); and the native Unix command to change file permissions is CHMOD.

The solution is to use these three layers of commands in concert. The command in the Robo-FTP script would look like this:

FTPCMD "SITE CHMOD xxx filename"

Where 'xxx' is a parameter to the CHMOD command (e.g. 777) defining the file access rights and 'filename' is the file on the FTP server to which to apply these new rights.

NOTE: This only applies to FTP (and FTPS) servers. This will not work on SSH (SFTP) or HTTP servers.

See also:

I'm trying to send a "site" command like this: FTPCMD "QUOTE SITE REC=FB LR=80 BLK=0" but it fails. What's wrong?

Robo-FTP script equivalents to Windows / Unix command line FTP commands

Article last updated: 2021-11-16

Tags: Robo-FTP, Raw FTP Commands