1

I have tried giving a directory read and write permissions without execution, but it seems like, without execution permissions, read and write don't allow you to do anything at all.

Hormoz
  • 165

1 Answers1

1

Yes, the user can list files in that directory (although not in subdirectories). Since a directory is functionally a list of file name+type+inum pairs, the r permission allows you to read the names stored in it. (Especially on older Unix systems where you could directly read a directory as if it were a file containing a bunch of "struct dirent".)

(Having just w would in theory allow you to add/remove the file names, but this also involves updating a file's own metadata – such as its link count – which causes x to additionally be required in practice. Merely reading the list of names, on the other hand, can be done without needing to know the link count so r is sufficient.)

u1686_grawity
  • 452,512