rwxrws--- .
To change a permission with
$ ls -l
-rw-rw-r-- 1 chris chris 40 Oct 12 17:18 oreilly
$ chmod
$ ls -l
-rw-r----- 1 chris chris 40 Oct 12 17:18 oreilly
$ chmod
$ ls -l
-rwxrw-r-- 1 chris chris 40 Oct 12 17:18 oreilly
The -R option causes
$ chmod -R o-w ~
4.8.1.5. Using group permissions
Users can belong to more than one group, which enables documents to be shared according to group roles.
Previously, we used Richard in group examples; he's a member of the groups
The group identity can be changed at any time using the
richard$ id
uid=503(richard) gid=503(richard) groups=503(richard),504(audit),505(soccer), 506(toronto),511 (acmeproposal),512(christmas),608(it)
richard$ newgrp
richard$ id
uid=503(richard) gid=504(audit) groups=503(richard),504(audit),505(soccer), 506(toronto),511 (acmeproposal),512(christmas),608(it)
The current group identity (also called
In this case, Richard can access any file that is readable by, say, the
$ ls -l
-rw-r--r-- 1 richard richard 3078 Oct 12 19:35 report.txt
$ chgrp
$ ls -l
-rw-r--r-- 1 richard audit 3078 Oct 12 19:35 report.txt
A normal user can set the group ownership only to one of the groups to which he belongs, and can change the group ownership only of files that he owns. The
Using
Richard could create a directory named
richard$ mkdir
richard$ chgrp
richard$ chmod
richard$ ls -ld
drwxrws--- 2 richard soccer 4096 Oct 12 19:46 game_scores
Everyone in the
4.8.1.6. Default permissions
When a Fedora program asks the Linux kernel to create a new file or directory, that program requests a default set of permissions. OpenOffice.org, for example, requests mode 0666 ( rw-rw-rw- ) on new files, because it knows that they aren't executable; the C compiler, on the other hand, requests 0777 ( rwxrwxrwx ) because the output of the C compiler should be an executable program.
This requested permission is limited by the current
You can set the
$ umask
$ umask