File and Folder Permissions

File and folder permissions can be changed using either:

The CHMOD command (abbreviated from change mode) is used to change file and directory permissions on UNIX based operating environments. Customers that are familiar with the SSH / Telnet interface will be more familiar with this command than customers that use FTP programs and the konsoleH File Manager tool to update file and directory permissions.

Permissions can apply to the following three categories:

  • User
  • Group
  • Other

The three types of permissions that can be granted or denied to each of the above categories are:

  • read (r)
  • write (w)
  • execute (x)

The following matrix can be used to calculate permissions:

 Permission  User  Group  Other
 Read  4  4  4
 Write  2  2  2
 Execute  1  1  1
 Total  7  7  7

The CHMOD command has several options that affect its behaviour, with the most common option being -R to change the permissions on a directory recursively.

The following shows the correct syntax and results of three popular CHMOD commands:

Syntax: chmod 777 filename
Result: -rwxrwxrwx ftplogin users filename

Syntax: chmod 644 directory
Result: drw-r—r—ftplogin users directory

Syntax: chmod 644 directory -R
Result: drw-r—r—ftplogin users directory