mardi 24 février 2015

Why can't a group member create a file in a directory with 760 permissions?


I have an account with secondary group membership in a group that owns a directory. The directory is chmod 760, which should allow writing to the directory, but not listing it. However, this is not allowed. Can somebody explain why?


Rationale: mostly academic; trying to understand permissions in detail. I recognize that I could make the permissions 770 and allow this; I'm not an idiot (at least I don't think so). I just want to understand what write permissions actually mean for a directory, if not file creation.


Code example:



powerdave@dhirsch-centos:/tmp >groups
powerdave wheel share
powerdave@dhirsch-centos:/tmp >ls -alh
total 124K
drwxrwxrwt. 5 root root 4.0K Feb 23 15:08 ./
dr-xr-xr-x. 23 root root 4.0K Feb 23 14:57 ../
drwxrw----. 2 guest share 4.0K Feb 23 14:52 test/
powerdave@dhirsch-centos:/tmp >touch test/file
touch: cannot touch `test/file': Permission denied


Aucun commentaire:

Enregistrer un commentaire