Original instructions: http://linuxcommand.org/lts0070.php
Permissions are divided in three sections "---" one "---" two "---" three. First one is for the user rights the "owner", second one is for group members and last one is for everybody else.
To see what permissions a file has type:
-rw-rw-r-- 1 me me 1097374 Sep 26 18:48 filename
The file "some_file" is owned by user "me"
User "me" has the right to read and write this file
The file is owned by the group "me"
Members of the group "me" can also read and write this file
Everybody else can read this file
$ ls -l filename
User "me" has the right to read and write this file
The file is owned by the group "me"
Members of the group "me" can also read and write this file
Everybody else can read this file
And to loan my studying material:
CHMOD
rwx rwx rwx = 111 111 111 rw- rw- rw- = 110 110 110 rwx --- --- = 111 000 000 --------------------------------------------------------------------- rwx = 111 in binary = 7 rw- = 110 in binary = 6 r-x = 101 in binary = 5 r-- = 100 in binary = 4
$ chmod 600 some_file
In the link provided on top of this post there you can find better tables how to use chmod with numbers.
CHANGING GROUP OWNERSHIP
The group ownership of a file or directory may be changed with chgrp. This command is used like this:
$ chgrp new_group some_file
Ei kommentteja:
Lähetä kommentti