The Execute permission makes sense for files (which include scripts etc), but when it comes to directories, write (w) permission works the same way as execute (x), right? Which means, if we are giving write permission to a directory we also normally check "x" (for execute) for that directory as well, right?
|
|
|||||||||||||||||
|
|
The execute permission on directories allows accessing files inside the directory. The read permission allows enumerating the directory entries. The write permission allows changing the directory attributes (e.g. its modification time) and creating and removing entries in it. Having read or write permission on a directory without execute permission is not useful. Having execute but not read permission is occasionally useful: it allows accessing files only if you know their exact name, a sort of primitive password protection. So in practice the useful permissions on a directory are:
See also Directory with +x permission, parents without it. When would this be useful? and Do the parent directory's permissions matter when accessing a subdirectory? |
|||||||||||||||
|