Lab 05
Lab 05
Permission Digit
• Example:
--- 0
chmod 600 private.txt --x 1
-w- 2
-wx 3
sets the permissions on private.txt to
r-- 4
rw------- (i.e. only the owner can read r-x 5
and write to the file). rw- 6
rwx 7
2. Modify Permissions Using Symbol
• Permissions may be specified Symbol Meaning
symbolically, using the symbols. u User
g Group
• $ chmod ug=rw,o-rw,a-x *.txt o Other
a All
r Read
• sets the permissions on all files
w Write
ending in *.txt to rw-rw---- (i.e. the
owner and users in the file's group x Execute
can read and write to the file, while + Add
the general public do not have any permission
sort of access). -
Take away
permission
Assign
=
permission
• chmod also supports a -R option which can be used to
recursively modify file permissions, e.g.