Thursday, October 11, 2007

Permissions and CHMOD

Letter Meaning
u The user who owns the file (this means “you.”)
g The group the file belongs to.
o The other users
a all of the above (an abbreviation for ugo)

Before: -rwxr-xr-x archive.sh
Command: chmod o=r archive.sh
After: -rwxr-xr-- archive.sh

Take away all permissions for the group for topsecret.inf We do this by leaving the permissions part of the command empty.
Before: -rw-r----- topsecret.inf
Command: chmod g= topsecret.inf
After:-rw------- topsecret.inf

Open up publicity.html for reading and writing by anyone.
Before: -rw-r--r-- publicity.html
Command: chmod og=rw publicity.html
After: -rw-rw-rw- publicity.html

No comments: