Questions about Directory and File Permissions
-
I’ve read that directory permissions apply to all the files in the directory. If a file has its own set of permissions, those take precedence over the directory permissions. In the case of default settings for a directory (755) and files (644), there would be no way for a file to be executed. Here’s how the default settings are applied:
1. Directory (755)
a) User = read/write/execute (7)
b) Group = read/execute (5)
c) World = read/execute (5)2. Files (644)
a) User = read/write (6)
b) Group = read (4)
c) World = read (4)Evidently, for these default settings to work the directory permissions have to take precedence over the file permissions. I notice that the difference between the directory permissions (755) and the file permissions (644) is the directory permissions include the execute permission and the file permissions do not include the execute permission. It seems to me that the directory permissions are being used to handle server requests and file permissions are being used for working on files. What’s the real story here?
- The topic ‘Questions about Directory and File Permissions’ is closed to new replies.