Changing Permissions
- The chmod command is used to change permissions.
- There are 2 forms of the command.
- The traditional way is to think in binary.
- So, each bit is either 1 or 0. A 1 means the permission is on. So, 111 represents read, write and execute (in that order).
- 111 in decimal is 7, so the following gives
rwx
to the owner, group, and other for the file abc
chmod 777 abc
- After a while you will memorize the most useful ones:
744
|
rwxr--r--
|
754
|
rwxr-xr--
|
751
|
rwxr-x--x
|
755
|
rwxr-xr-x
|
700
|
rwx------
|
777
|
rwxrwxrwx
|
- Read the man page for chmod to learn about the other way to change permissions.