I work very irregularly with Linux. When I do, however, I often have to change the permissions of a file. And almost every time it happens that I can not remember the rough concepts and the commands. Therefore, I have decided to write it down here very briefly . Maybe it will help even someone else..
Show permissions of a file or folder:
ls -ld filename
What does all the following mean?
ModeFields Hardlinks Owner Group Filesize Date&Time Filename
The first mode field is the „special file“ designator. It basically marks the type of the file Regular files display as – (none). Then, the mode field has three triples of format rwx . The first triple determines the permissions for the user , the second for the group and the third for others. r ⇒ read access, w ⇒ write access , x ⇒ executable.
Give all permissions to everyone:
chmod 777 filename
chmod means change mode fields. 7 is 4+2+1 that is 111.
Installing and updating software