2

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
  • So, after reading that "duplicate", the question remains: is there any meaning to +w on a directory if +x is required for all the writing operations? – Dave Hirsch Feb 25 '15 at 00:26

1 Answers1

2
  • r allows listing — just the names.
  • w deleting and adding.
  • t prevents deleting — if you don't own it.
  • x allows navigation — stating a file or directory: reading meta data, reading meta-data is needed to be able to access, add or delete a file within the directory.

If you can not navigate, then you can not delete, add, or anything else.