16.12 Ownership and Permissions 251
Figure 16.19: Removing, then restoring permissions
u+x – allows the file owner to execute the file
a+rw – allows everyone to read and write to the file
ug+r – allows the owner and group to read the file
g=rx – lets the group only read and execute (not write)
By adding the -R option, we can change permissions for entire directory trees.
There’s a slight twist, however, because we can’t really “execute” a directory as we would an appli-
cation. Instead, when we add or remove execute permission for a directory, we’re really allowing (or
denying) permission to search through that directory.
To allow everyone read and write access to the tigger directoryinourlogindirectory,wejusttype:
chmod -R a+rw tigger
But. . . If we don’t allow others to have execute permission to tigger, it doesn’t matter who has read
or write access, because no one will be able to get into the directory – unless they know the exact
filename they want.
For example, let’stype:
Comments to this Manuals