File Permissions
In the diagram below, we see how the first portion of the listing is interpreted. It consists of a character indicating the file type, followed by three sets of three characters that convey the reading, writing and execution permission for the owner, group, and everybody else.
Directory Permissions
The chmod command can also be used to control the access permissions for directories. Again, we can use the octal notation to set permissions, but the meaning of the r, w, and x attributes is different:
-
r - Allows the contents of the directory to be listed if the x attribute is also set.
-
w - Allows files within the directory to be created, deleted, or renamed if the x attribute is also set.
-
x - Allows a directory to be entered (i.e. cd dir).
阅读(579) | 评论(0) | 转发(0) |