Carbon_Permission and Container inheritance in DSC

21 views
Skip to first unread message

retroti...@gmail.com

unread,
Dec 12, 2017, 6:07:55 PM12/12/17
to Carbon
Hi,

Is there a way to disable inheritance at the container (folder) level with the Carbon module in DSC?

Currently Carbon_Permission: ApplyTo = 'ContainerAndSubContainersAndLeaves' will set the current identity, but is there a way to turn off the folder inheritance also? The built-in DSC "File" module creates the folder with inheritance enabled.  I currently have to use a different module to turn this off.  Outside of DSC I would use Disable-AclInheritance to do this, but am looking for this within DSC.

Looking for something in DSC similar to the following operation:

New-Item -Path 'c:\myFolder' -ItemType Directory
Grant-Permission -Identity myIdentity -Path 'c:\myFolder' -Permission ReadAndExecute -ApplyTo SubContainersAndLeaves
Disable-AclInheritance -Path 'c:\myFolder'
New-Item -Path 'c:\myFolder\Leaf1' -ItemType Directory

This way permission inheritance for the children/leaves starts inheritance from the myFolder level, not the root of it


Aaron Jensen

unread,
Dec 12, 2017, 7:55:05 PM12/12/17
to retroti...@gmail.com, Carbon
There’s no DSC resource for this in Carbon. Sorry. :-(
--
You received this message because you are subscribed to the Google Groups "Carbon" group.
To unsubscribe from this group and stop receiving emails from it, send an email to carbonps+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/carbonps/e9a5bff2-a802-47d0-b849-adfdb31c03d4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages