chmod - Change file permissions and modes in SFTP

PSFTP allows you to modify the file permissions on files on the server.
You do this using the chmod command, which works very much like the Unix chmod command.

psftp> chmod modes filename

The modes parameter can be a set of octal digits in the Unix style.

psftp> chmod 777

The above code grants read, write, execute permissions to everybody for the


psftp> chmod go-rwx,u+w
psftp> chmod a+r

r- read

+ symbol gives the permissions mentioned and - symbol revokes the permissions.

g- group of users
o,a - all
u- own user

So, in the above code
chmod go-rwx,u+w --> revokes all permissions from group users, all and gives write permission for the own user.
chmod a+r --> gives read permission to all