JeffreyHoward has asked for the wisdom of the Perl Monks concerning the following question:
The script uses Win32::FileSecurity module to access NT filesystem permissions. Setting permission however is done in two steps:
1.) A permission mask is generated from user friendly settings
while (($usr,$mask) = each %PERMISSIONS) #set the permissions
{$PERMISSIONS{$usr}=MakeMask($mask);}
2.) Permission mask is then applied to the file.
Set($file,\%$perm) ;
Here is a copy of the script that we are trying to execute:Any suggestions or help with this would be great!! Thanks...use Win32::FileSecurity qw(MakeMask Get Set); #file premissions sub set_permission{ my($file, $perm)=@_; Set($file,\%$perm) ; } %PERMISSIONS=("CTSDEV\\Domain Admins"=>"F", "Everyone"=>"C", "Production Control"=>"F", "Systems & Technology"=>"C"); while (($usr,$mask) = each %PERMISSIONS) #set the permissions {$PERMISSIONS{$usr}=MakeMask($mask);} set_permission("\\\\ctscolfpadev\\acpt\\phrem\\bin\\test.exe",\%PERMIS +SIONS) or die "Just couldn't\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(tye)Re: Setting Win NT permissions
by tye (Sage) on Apr 17, 2001 at 18:38 UTC | |
by JeffreyHoward (Initiate) on Apr 17, 2001 at 23:02 UTC | |
|
Re: Setting Win NT permissions
by idnopheq (Chaplain) on Apr 18, 2001 at 06:58 UTC |