[Israel.pm] check file privilage

Pinkhas Nisanov nisanov at netvision.net.il
Wed Jun 30 07:19:33 PDT 2004


On Wed, 2004-06-30 at 05:24, Afgin Shlomit wrote:
> I would like to know if I can know for a specific file if a specific user
> have unix read/write permission. Not the user that run the program, a
> different user.

You need to use "stat" function, it will get
permission of file and user and group ID of
owner, then you compare it to UID and GID
( "$<" for UID and "$(" for GID ) of script
runner.


regards
Pinkhas Nisanov




More information about the Perl mailing list