Change permissions on Linux - how it works
You can change the access rights for each file under Linux. In this practical tip, we explain how this works and what the permissions mean.
What access rights are there?
You can assign permissions to read, write and execute a file.
- You assign read rights with "r" or "4".
- With "w" or "2" you define the write access.
- You define the execution rights with "x" or "1".
- The rights are put in brackets and separated by a comma. For example, an assignment of rights looks like this: (4, 2, 1)
- If you put a "-" in front of an authorization, it will be refused.
- If you want to give the owner of a file all rights, he will get the numbers 4.2 and 1 in total 7. A certain group should only have read and execute rights, so the numbers 4 and 1 are added. All other users should only be allowed to execute the file, i.e. the 1. The rights would therefore be defined with (7, 5, 1).
Change permissions on Linux - how it works
You set the authorization under Linux with the "chmod" command. You can also use this to change the rights.
- Enter a dial tone after the "chmod" command and then enter the number combination from the authorizations that you want to assign.
- After the number combination, the name of the file for which the authorization is to be changed also follows a dial tone.
- For example, if you want to assign the rights from our example above to a file, the command is "chmod 751 filename".
If you want to install Linux on a Windows 8 tablet, you will find detailed instructions in our next practical tip.