DSC File resource object and ACLs

This topic contains 3 replies, has 3 voices, and was last updated by Profile photo of Aaron Jensen Aaron Jensen 2 years, 1 month ago.

  • Author
    Posts
  • #19489
    Profile photo of Kevin McFerrin
    Kevin McFerrin
    Participant

    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.

    Thanks!

  • #19498
    Profile photo of Dave Wyatt
    Dave Wyatt
    Moderator

    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
    Profile photo of Kevin McFerrin
    Kevin McFerrin
    Participant

    Thanks, I will look into that!

  • #19578
    Profile photo of Aaron Jensen
    Aaron Jensen
    Participant

    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.