I want to set a specific folder with specific rights to inherit all rights of it's parent folder. I know I should use icacls
.
My folders look like this:
- mp
- build (set this one to inherit from mp)
Learning What icacls Command is and How it Works In this context, an ACL contains a list of a user or a group's permissions on an object within the NTFS file system. Each entry in an ACL is called an Access Control Entry (ACE). ACEs contain permissions and details about how child objects inherit these permissions.
With icacls, administrators can view or modify access control lists for files and folders, to help understand and fix inherited permissions. Icacls inheritance options can be used to apply permissions to parent and child objects throughout the file structure.
The chmod command with the -R options allows you to recursively change the file's permissions. To recursively set permissions of files based on their type, use chmod in combination with the find command.
Like this:
icacls "build\*" /q /c /t /reset
The secret was:
/reset - Replaces ACLs with default inherited ACLs for all matching files.
/t - Performs the operation on all specified files in the current directory and its subdirectories.
Read more at Microsoft Technet icacls
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With