# N o I n h e r . p l # ------------------- # This is a demonstration on applying non-standard permissions # on a container object (in this case a directory). # # The Administrators group is granted FULL control on both the # directory and files in the directory. All subdirectories will # inherit the these permissions. # The Users group will be granted CHANGE control on both the # directory and files in the directory, however no permission # will be inherited for the Users group into subdirectories. # # These are "non-standard" permissions therefore the Explorer.exe # and the File Manager will complain that they are not displayable. # # 1999.05.28 use Win32::Perms; $Dir = 'm:\temp\test' unless( $Dir = $ARGV[0] ); $P = new Win32::Perms(); $P->Allow( 'administrators', FULL, FILE ); $P->Allow( 'administrators', CHANGE, DIR ); # Set the file permissions so that they are not propagated # into files in subdirectories. $P->Allow( 'users', FULL, FILE | NO_PROPAGATE_INHERIT_ACE ); # Set full permission on the directory with no specification on # inheritance--so subdirectories do not inherit the permissions. $P->Allow( 'users', FULL, 0 ); # Just for fun print out the permissions... $P->Dump(); print "Setting permissios on '$Dir'...\n"; $Result = $P->Set( $Dir ); print "\t" . ( ( $Result )? "Successful" : "Failure!" ) . "\n"; print "Finished\n";