Question
In my CMS, I noticed that directories need the executable bit (+x) set for the user to open them. Why is the execute permission required to read a directory, and how do directory permissions in Linux work?
Answer by Chris Down
When applying permissions to directories on Linux, the permission bits have different meanings than on regular files.
- The write bit allows the affected user to create, rename, or delete files within the directory, and modify the directory’s attributes
- The read bit allows the affected user to list the files within the directory
- The execute bit allows the affected user to enter the directory, and access files and directories inside
- The sticky bit states that files and directories within that directory may only be deleted or renamed by their owner (or root)
Article link: http://xnerv.wang/execute-vs-read-bit-how-do-directory-permissions-in-linux-work/
Reprinted from: (StackOverflow) Execute vs Read bit. How do directory permissions in Linux work?