Win32::FileSecurity
The Win32::FileSecurity module allows you to work with
NT File System (NTFS) file permissions. File permissions are stored as
Discretionary Access Control Lists (DACLs) for each file or directory.
These lists contain a bitmask specifying the permission rights for
users on the file or directory. This module implements a DACL as a
permissions
hash in which each key is a
username, and the value is the bitmask for the permissions.
The FileSecurity module exports the following constants to describe user permissions:
ACCESS_SYSTEM_SECURITY READ or R CHANGE or C SPECIFIC_RIGHTS_ALL DELETE STANDARD_RIGHTS_ALL FULL or F STANDARD_RIGHTS_EXECUTE GENERIC_ALL STANDARD_RIGHTS_READ GENERIC_EXECUTE STANDARD_RIGHTS_REQUIRED GENERIC_READ STANDARD_RIGHTS_WRITE GENERIC_WRITE SYNCHRONIZE MAXIMUM_ALLOWED WRITE_DAC READ_CONTROL WRITE_OWNER
Using the constant
function
on one of these constants gives its value, and bitmasks or multiple
permissions settings can be made by supplying a list of these
constants to the MakeMask
function.
The following functions are exported by the Win32::FileSecurity module.
Get Perl in a Nutshell, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.