
File and directory handling 229
DONE
INDEX
INDEX
The permissions of the directory dira are 754:
• everybody can read (= see) the directory dira, e.g. use ls on dira
• only the owner jim and members of the group sys can read and search e.g.
use cd, pwd, ls, cat, more, du, file on or in dira
• only the owner jim can also write or remove files in dira, e.g. use rm, cp,
mv, touch on files in dira
• In the following example the directories dira, dirb and dirc are assumed to be
readable and searchable.
• creating files
If the user guest wants to create the file fila, e.g. :
touch /dira/dirb/dirc/fila
the directory dirc must be writable for guest, the parent directories dirb and
dira do not
have to be writable for guest
• removing files
If the user guest wants to remove the file fila, e.g. :
rm /dira/dirb/dirc/fila
the directory dirc must be writeable for guest, the parent directories dirb and
dira do not
have to be writable for guest. The file fila can have any permis-
sions, even 000, and any owner or group, you can always remove it if its di-
rectory is writable !
Komentáře k této Příručce