Hello:

        I have a question regarding the initialization of variables and the
Win32::Perms module.  If I have the following code, everything works fine:

# Set the HOME directory NTFS permissions.

$Path = 'dir:' . "\\\\Server\\Home\\$UserName";

$PermDirFlag = DIRECTORY;
$PermDirMask = READ | EXECUTE;

$PermFileFlag = FILE;
$PermFileMask = READ | EXECUTE;

$HomeDir = new Win32::Perms($Path) ||
        warn "Cannot create new permissions object: $!\n";

$HomeDir->Allow($UserName, $PermDirMask, $PermDirFlag);
$HomeDir->Allow($UserName, $PermFileMask, $PermDirMask);
$HomeDir->Set();


However, if I initialize both of the "flag" variables at the top of my
program, like this:

$PermDirFlag = "";  # also doesn't work when using literal quotes ''
$PermFileFlag = ""; # also doesn't work when using literal quotes ''

then the permissions for the user become (RX)(Not Specified), when what I
really want is (RX)(RX).  Can anyone tell WHY this happens?  Thanks in
advance.


Dean Theophilou
Genisar

_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin

Reply via email to