[Next] [Up] [Previous] [Contents]
Next: Job Control
Up: File Permissions
Previous: Dependencies
The command chmod is used to set the permissions on a file. Only
the owner of a file may change the permissions on that file.
The syntax of chmod is:
{a,u,g,o}{+,-}{r,w,x}
filenames
Briefly, you supply one or more of
all, user, group, or other. Then you specify
whether you are adding rights (+) or taking them away (-).
Finally, you specify one or more of
read, write, and execute. Some examples of legal
commands are:
{1.5 ex
1 ex
.9 in
0.1 in
1 in
0 in
1 ex
0 in
<<110>> [chmod a+r stuff]
Gives all users read access to the file.
[chmod +r stuff]
Same as above-if none of a, u, g, or o is
specified, a is assumed.
[chmod og-x stuff]
Remove execute permission from users other than the owner.
[chmod u+rwx stuff]
Allow the owner of the file to read, write, and execute the file.
[chmod o-rwx stuff]
Remove read, write, and execute permission from users other than the
owner and users in the file's group.