XP is just a number | |
PerlMonks |
Re: How do I generate a listing of all users who can access a directory?by insensate (Hermit) |
on May 04, 2004 at 19:40 UTC ( [id://350509]=note: print w/replies, xml ) | Need Help?? |
"Unix directory access permission require someone to have access to every directory in the path leading up to a given 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.
In Section
Seekers of Perl Wisdom
|
|