Skip to content

Commit

Permalink
BREAKING: config-files should be owned by mysql-user (#56)
Browse files Browse the repository at this point in the history
* BREAKING: config-files should be owned by mysql-user

Signed-off-by: Sebastian Gumprich <[email protected]>

* conf-files should belong to user root

Signed-off-by: Sebastian Gumprich <[email protected]>
  • Loading branch information
rndmh3ro authored Aug 26, 2020
1 parent e37d598 commit a2faf0b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions controls/mysql_conf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -123,22 +123,22 @@

control 'mysql-conf-07' do
impact 0.7
title 'ensure the mysql config file is owned by root'
title 'ensure the mysql config file is owned by user root, group mysql'
describe file(mysql_config_file) do
it { should be_file }
it { should be_owned_by 'root' }
it { should be_grouped_into 'root' }
it { should be_grouped_into 'mysql' }
it { should_not be_readable.by('others') }
end
end

# test this only if we have a mysql_hardening_file
control 'mysql-conf-08' do
impact 0.5
title 'ensure the mysql hardening config file is owned by root'
title 'ensure the mysql hardening config file is owned by user root, group mysql'
describe file(mysql_hardening_file) do
it { should be_owned_by 'root' }
it { should be_grouped_into 'root' }
it { should be_grouped_into 'mysql' }
it { should_not be_readable.by('others') }
end
only_if { command("ls #{mysql_hardening_file}").exit_status.zero? }
Expand Down

0 comments on commit a2faf0b

Please sign in to comment.