Be careful. A user needs execute permission on a directory to pass through, read permission to view contents. opendir will succeed on a directory where you have '--x' permissions but you will obviously not have access to directory contents. Make sure a component of your solution actually tries a read on each directory.
Update:
I was not clear, opendir will fail on a directory that doesn't have it's 'r' bit set (assuming non-root). However if I open a directory say /homes/insensate/allx/freeforallWhere allx is --x--x--x and freeforall is rwxrwxrwx the opendir will succeed.
My point is to not let an assumption that access to a given directory implies access to parent directories stand.
In reply to Re: How do I generate a listing of all users who can access a directory?
by insensate
in thread How do I generate a listing of all users who can access a directory?
by BlaisePascal
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |