I need to know how to check the effective file access permissions for a given user, but it takes long to do this manually starting from / up to the target file or directory, checking group, ...etc.
Tell me more
×
Unix & Linux Stack Exchange is a question and answer site for
users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.
|
|
||||
|
|
|
From what I see, the only ways would be to either do what you describe, check each of the permissions sets against the effective user/group. Or you could try to set up sudo to be able to take
Like you said, check the effective user/groups permissions:
On my Ubuntu 11.04 system, running this script takes about 16ms, on average. Also, stat does not need read/execute per |
|||
|
|