in reply to How do I generate a listing of all users who can access a directory?
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: How do I generate a listing of all users who can access a directory?
by sgifford (Prior) on May 04, 2004 at 19:55 UTC |