diff options
author | Daniil Baturin <daniil@baturin.org> | 2019-01-26 22:54:33 +0100 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2019-01-26 22:54:33 +0100 |
commit | ede8a31c5896646e7ed3a8fbd6212b998d9ce01f (patch) | |
tree | 886e97b54d7aaccd310d6fbd53ff98aa1be5b67c | |
parent | 26335f877539ad13042d28e33e8171aa7c6f5b3b (diff) | |
download | vyatta-config-mgmt-ede8a31c5896646e7ed3a8fbd6212b998d9ce01f.tar.gz vyatta-config-mgmt-ede8a31c5896646e7ed3a8fbd6212b998d9ce01f.zip |
T1206: fix logrotate config permissions.
-rwxr-xr-x | scripts/vyatta-config-mgmt.pl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/vyatta-config-mgmt.pl b/scripts/vyatta-config-mgmt.pl index 853fc82..0d23fcb 100755 --- a/scripts/vyatta-config-mgmt.pl +++ b/scripts/vyatta-config-mgmt.pl @@ -209,6 +209,11 @@ if ($action eq 'update-revs') { $lr_conf .= "\t copy \n"; $lr_conf .= "}\n"; cm_write_file($lr_conf_file, $lr_conf); + + # logrotate doesn't like when its config is writeable + # for anyone but root + system("sudo chmod 644 $lr_conf_file"); + my $num_revs = cm_get_num_revs(); if (! -e "$archive_dir/commits" or $num_revs == 0) { # store a baseline config |