Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wix: How to set permissions for folder and all sub folders

I know how to set the permissions for a folder:

<DirectoryRef Id="ProgramFilesFolder">   <Directory Id="PHPFolder" Name="PHP">     <Component Id="PHP_comp" DiskId="1" Guid="*">       <CreateFolder>         <Permission User="Everyone" GenericAll="yes" />       </CreateFolder> 

However I need the permissions to be applied to all subfolders as well. Is this possible with out listing all the folders?

like image 661
Mike Avatar asked Nov 24 '10 23:11

Mike


People also ask

How do I give permission to all files in a folder?

To change directory permissions for everyone, use “u” for users, “g” for group, “o” for others, and “ugo” or “a” (for all). chmod ugo+rwx foldername to give read, write, and execute to everyone. chmod a=r foldername to give only read permission for everyone.

How do I give folder permission to domain?

Go to AD Mgmt > File Server Management > Modify NTFS permissions. Choose which folders you want to enable a user or group access to. Now go to the Accounts section and choose the users or groups you want to grant permission to access the folder. Finalize the changes by clicking Modify.


1 Answers

First of all, I would recommend you using PermissionEx instead. It is a standard WiX extension and it has one really huge advantage over Permission - it doesn't overwrite, but modifies ACLs. And by default, it applies permissions to the folder and all its descendant files and folders, so you don't have to specify anything extra.

Hope this helps.

like image 155
Yan Sklyarenko Avatar answered Sep 21 '22 18:09

Yan Sklyarenko