Directory Permissions
Directories are also files under Linux. For example, again use the ls command to show permissions like this:
matthew@seymour:~$ mkdir directorymatthew@seymour:~$ ls -ld directorydrwxr-xr-x 2 matthew matthew 4096 2010-06-30 13:23 directory
In this example, the mkdir command is used to create a directory. The ls command, and its -ld option, is used to show the permissions and other information about the directory (not its contents). Here you can see that the directory has permission values of 755 (read + write + execute or 4 + 2 + 1, read + execute or 4 + 1, and read + execute or 4 + 1).
This shows that the owner can read and write to the directory and, because of execute permission, also list the directory’s contents. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access