DSC File resource object and ACLs

This topic contains 3 replies, has 3 voices, and was last updated by  Aaron Jensen 3 years, 9 months ago.

  • Author
  • #19489

    Kevin McFerrin

    Does anyone know if there is a way to use the existing File resource to set ACLs on files or directories, or would I have to write a custom resource? Has anyone written a community or experimental resource to do this?

    It seems like DSC would be a good tool for helping manage audit compliance, at least during initial builds, but I've looked into it using "Get-DSCResource –Name File –Syntax" on the 4.0 and 5.0 Previews and don't see any facility for this.


  • #19498

    Dave Wyatt

    The File resource doesn't have any access control functionality built-in, but Rohn Edwards has written DSC Resources along with his PowerShellAccessControl module, which are up on the PowerShell.org GitHub repo: https://github.com/PowerShellOrg/DSC/tree/master/Resources/PowerShellAccessControl

  • #19518

    Kevin McFerrin

    Thanks, I will look into that!

  • #19578

    Aaron Jensen

    The Carbon module has a Carbon_Permission DSC resource for setting permissions on files, directories, registry keys, and certificate private keys. (Disclaimer: I am the creator/owner of Carbon.)

You must be logged in to reply to this topic.