Ask Your Question

Does puppet ignore some file modes on directories?

asked 2016-06-14 11:16:19 -0600

Red Cricket gravatar image

I have this bit of code on my manifest:

 file { '/etc/cinder':
    ensure  => directory,
    path    => '/etc/cinder',
    owner   => 'cinder',
    group   => 'cinder',
    mode    => '0640',

I know mode 640 doesn't make much sense but that is besides the point. If I log on to my agent and execute:

# chmod 777 /etc/cinder

Then I run puppet:

# puppet agent -t
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: NetworkManager is not running.
Info: Caching catalog for
Info: Applying configuration version '1465920531'
Notice: /Stage[main]/Cinder/File[/etc/cinder]/mode: mode changed '0777' to '0750'
Notice: Finished catalog run in 44.49 seconds

Why doesn't puppet use mode 640?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-06-14 11:31:39 -0600

As far as I know this has always been a feature in Puppet, documented here:

When specifying numeric permissions for directories, Puppet sets the search permission wherever the read permission is set.

edit flag offensive delete link more


Thanks Alex!

Red Cricket gravatar imageRed Cricket ( 2016-06-14 17:30:50 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2016-06-14 11:16:19 -0600

Seen: 1,803 times

Last updated: Jun 14 '16