Skip to content

Commit 579651c

Browse files
committed
Per conversation with @ccaum, switching to a whitelist approach to file permissions and using a default of 0400; overriding it to 0644 when needed.
1 parent 11280be commit 579651c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

manifests/config.pp

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,18 @@
2525
}
2626
file{'/root/.my.cnf':
2727
content => template('mysql/my.cnf.pass.erb'),
28-
mode => '0400',
2928
}
3029
if $etc_root_password {
3130
file{'/etc/my.cnf':
3231
content => template('mysql/my.cnf.pass.erb'),
3332
require => Exec['set_mysql_rootpw'],
34-
mode => '0400',
3533
}
3634
}
3735
}
3836
File {
3937
owner => 'root',
4038
group => 'root',
39+
mode => '0400',
4140
notify => Exec['mysqld-restart'],
4241
require => Package['mysql-server']
4342
}
@@ -52,5 +51,6 @@
5251

5352
file { '/etc/mysql/my.cnf':
5453
content => template('mysql/my.cnf.erb'),
54+
mode => '0644'
5555
}
5656
}

0 commit comments

Comments
 (0)