chmod
command is used to control the access permissions for directories. We can use the octal notation to set permissions. To describe the octal notation, we can add permission values to obtain new, combined (octal) values.cd dir
).chmod
permission. The first digit represents the permissions of the user, the second represents the group, and the third represents global permissions. So if a file has permissions 754
, the user can read, write, and execute; the group can read and execute, while all other users can only read.600
is a common setting for data files that the owner wants to keep private. The owner may read and write a file. All others have no rights.600
is equivalent to rw-------
.chmod
command to set it to 600
.rwxrwxrwx
rwxr-xr-x
rwx------
rw-rw-rw-
rw-r--r--
rw-------
rwxrwxrwx
rwxr-xr-x
rwx------