Directory permissions refer to the ability to list the files or create new files.
As far as UNIX is concerned, directories are just special files. Only instead of containing text or data or what-have-you, directories just contain pointers to other files, and the operating system pulls a few magic tricks to make us think of directories as “containing” these files.
So the same way that write permission to a file determines whether you can change the file, write permission to a directory determines whether you can change the contents of the directory; that is, whether you can add new files or delete existing files. Similarly, read permission for a directory determines whether you can list the contents of the directory via ls or another program. Meanwhile, execute permission controls whether you can cd to the directory.
The directory permissions don’t have any effect on the permissions of the files within it. You might ...
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
