Ace jr has asked for the wisdom of the Perl Monks concerning the following question:

Looking for a way to get file permissions in a readable format using Perl64.

Replies are listed 'Best First'.
Re: File Permission in a readable format.
by Eliya (Vicar) on Mar 07, 2012 at 18:57 UTC

    How would you define "readable"?

      Eliya,

      I am looking for a "RWX" type of result. Anything that would be easy for a person to read. For a 32 bit machine I used the "Win32::Perms($obj)" and then "$Perm->Dump(\@List)" to make the HASH readable. but "$Perm->Dump(\@List)" does not work on a 64 bit machine so I only have the HASH. Thank you, Ace jr

      And it is a Window 2008 box. Ace jr

Re: File Permission in a readable format.
by Anonymous Monk on Mar 08, 2012 at 02:47 UTC

      Thank you, I will look into it. This looks like Unix, will it work on a Windows 2008?

        Sure, why not, but windows permissions are much more complicated than that, so if

        $ ls -loanh C:\AUTOEXEC.BAT -rwxrwxrwx 1 0 394 2011-03-24 20:44 C:\AUTOEXEC.BAT
        satisfies, then it satisfies :)

        If it doesn't, there is always cacls/Win32::FileSecurity

        $ cacls C:\AUTOEXEC.BAT C:\AUTOEXEC.BAT BUILTIN\Administrators:F NT AUTHORITY\SYSTEM:F BUILTIN\Administrators:F BUILTIN\Users:R