How to check permission of a file or path?
Posted on 2006-10-27
I know this is possible by "stat" command or "ls" command but I'm looking for a command to return me if $USER (current user) has privilege or permission to a specific /dir1/dir2/a_file
1) Let's say user1 runs script1
2) user1 has access to some paths and no access to some others
3) I need a command to return a true/false value or anything to check it in my script befoer following a procedure.