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

Does anyone know if Perl can get File Permissions on a specific file or a directory on a Win32 machine. (ie..what users or groups have access to file or directory) If so, can anyone point me in the right direction as to obtain this information. Much thanks. A Novice Monk. ~Ray~

Replies are listed 'Best First'.
Re: File Security Permissions on NT
by joefission (Monk) on Jul 11, 2001 at 00:58 UTC
Re: File Security Permissions on NT
by particle (Vicar) on Jul 11, 2001 at 00:57 UTC
    you can use system('cacls');

    i don't know if active state has anything better...
    a quick check of the docs suggests use Win32::FileSecurity;

    i'd use cacls, it's more stable, it's well documented, and i'm used to it.

    ~Particle

Re: File Security Permissions on NT
by Sniper (Scribe) on Jul 11, 2001 at 12:17 UTC
    You can use Dave Roth's Extension : Win32::Perms

    David "Sniper" Rigaudiere

Re: File Security Permissions on NT
by rrwo (Friar) on Jul 11, 2001 at 03:44 UTC

    Yes. Look at the Win32::* modules. Specifically Win32::FileSecurity.

    I highly recommend David Roth's books: <cite>Windows NT: Win32 Perl Programming</cite> and <cite>Win32 Perl Scripting</cite>. Also check out Roth's web site.

      Thanks guys. Much appreciated.

        I forgot to mention: a review of Roth's <cite>Win32 Scripting</cite> can be found here.