Changes the access permissions (read, write, execute) of files or directories.


First available in version 3.0 build 2039.

Input Parameters:

mode - The new file permission settings.

remotePath - The name of the file or directory to change.

Output Parameters:

errorDetails - Raw error code and description from the FTP server.

Asynchronous Mode:

When this method is called asynchronously, a return object containing the output parameters is passed to the specified callback function.

ssCore.FTP.chmod( paramsObject [, callbackParamsObject] [, errorParamsObject] );

Synchronous Mode:

When this method is called synchronously, a return object containing the output parameters is returned to the caller immediately.

var returnObject = ssCore.FTP.chmod( paramsObject );


The mode consists of three octal (base 8) digits.

The value of each digit represents the type of access that is allowed:

The position of the digit in the mode represents who the permission applies to: user (you), your group (users set-up on your account), and other (everyone else). This table shows some commonly used mode values:

Note: You can't use CHMOD to set or change the "directory bit".



The following example sets the permissions for the files directory so that only reading is allowed.

ssCore.FTP.chmod({mode:"744", remotePath:"/files"});