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"; }
In reply to Modifying NTFS Permissions by onetime
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |