Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using icacls to set permissions of a folder to inherit recursively

Tags:

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)
like image 938
Asken Avatar asked Mar 11 '14 13:03

Asken


People also ask

What is the icacls abbreviation that means that files created inside this folder will inherit this ace?

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.

What is icacls inheritance?

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.

How do I set recursive permissions?

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.


1 Answers

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

like image 83
Asken Avatar answered Oct 04 '22 21:10

Asken