onetime has asked for the wisdom of the Perl Monks concerning the following question:
Any help would be apperciated. Thanks.use constant SE_DACL_PROTECTED => 0x1000; my $ADsSecurity = Win32::OLE->new("ADsSecurity"); my $objSD = $ADsSecurity->GetSecurityDescriptor("FILE://". $path); #get the control flags my $control_flags = $objSD->{Control}; print "Current Flag: $control_flags\n"; #37892 = 0x9404 = no inheritance set if($control_flags == 37892){ #37892 ^ 4096 (0x1000) = 33796 = 0x8404 = set inheritance $control_flags = $control_flags ^ SE_DACL_PROTECTED; $objSD->{Control} = $control_flags; $ADsSecurity->SetSecurityDescriptor($objSD); print "Set for Inheritance: $control_flags\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Modifying NTFS Permissions
by BrowserUk (Patriarch) on Jul 17, 2008 at 17:08 UTC | |
|
Re: Modifying NTFS Permissions
by Anonymous Monk on Jul 18, 2008 at 08:19 UTC |