Puppet 3.8.1 on Windows 7 x64 SP1 error with file resource

18 views
Skip to first unread message

jmp242

unread,
Sep 23, 2015, 2:43:52 PM9/23/15
to Puppet Users
I cannot test this easily as it seems to only happen when the puppet service runs. It does not happen when run interactively as an administrator. Once an administrator does a 'puppet agent -t' the issue does not recur for some time, perhaps until the computer reboots for Windows Updates. Here is the simple example file

file { 'chocolatey.config':
        path    
=> "C:/ProgramData/chocolatey/config/chocolatey.config",
        content
=> template('yum/chocolatey.config.erb'),
        owner  
=> 'SYSTEM',
       
group   => 'Administrators',
        mode    
=> '0775',
       
ensure  => present,
     
}

I do not get this issue with other files, but most Windows computers end up logging:
Failed to set group to 'S-1-5-32-544': Failed to initialize ACL: The parameter is incorrect.

Would using a different group help? Changing mode to 775 instead of '0775'?

I have been suggested before I ought to use a different method, but then how do I actually deploy the file? From my understanding, I HAVE to provide owner, group and mode on Windows for the file to be deployed. Is this no longer the case?

Peter Kristolaitis

unread,
Sep 23, 2015, 2:49:20 PM9/23/15
to puppet...@googlegroups.com
I don't use user/group/mode in any of my File resources on Windows boxes.  Definitely not a required parameter.

If you need to tweak permissions, you should be using the puppetlabs-acl module instead.

- Peter
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/7dccbdd1-013e-4921-86c1-6350dcb35321%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages