Skip to content

Commit 010bf13

Browse files
committed
Set owner of server config.ini to root
The puppetdb user doesn't need to write to the config (it's managed by Puppet after all) so setting the owner to root and using the group to only read is safer. It is also closer to packaging, which ensures the owner is root after a package update. Ideally packaging would use the same group and mode as well so there isn't an event after a package update, but this change at least trims it down from 3 changes to 2.
1 parent 29ff29e commit 010bf13

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

manifests/server/global.pp

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,16 @@
22
class puppetdb::server::global (
33
$vardir = $puppetdb::params::vardir,
44
$confdir = $puppetdb::params::confdir,
5-
$puppetdb_user = $puppetdb::params::puppetdb_user,
65
$puppetdb_group = $puppetdb::params::puppetdb_group,
76
) inherits puppetdb::params {
87

98
$config_ini = "${confdir}/config.ini"
109

1110
file { $config_ini:
1211
ensure => file,
13-
owner => $puppetdb_user,
12+
owner => 'root',
1413
group => $puppetdb_group,
15-
mode => '0600',
14+
mode => '0640',
1615
}
1716

1817
# Set the defaults

0 commit comments

Comments
 (0)