I am having a bit of trouble understanding what the execute permission means for directories. Do I understand it correctly that anything in a directory for which a user does not have x-rights is inaccessible even if the things inside the directory gives specific rights to the user?
Or will the user still have direct access to the things in the directory, but simply cannot list what is in the directory?
(What I am really trying to understand is how safe a directory is from access from other users if they do not have x-permission for it.)
Best Answer
x bit for directory is also called as search bit. Actually, it enables you to access the inodes of the files listed inside the folder. So if you want to access /home/user/foo/bar.txt then you must have search access on every ancestor of bar.txt
Quoting from the page
Please read more at file permission directory section.
Update: Leo raised a very good question. If we know the inode then can we access a file from a directory having it's x bit unset? I believe, we should not be able to do so. I did not test it by c program but rather used some handy bash commands to confirm it.