Skip to content

Commit f2ec869

Browse files
author
Till Brehm
committed
Set file mode explicitly for rspamd worker-controller.inc config file to not rely on system umask.
1 parent 065d5ff commit f2ec869

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

install/lib/installer_base.lib.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1644,7 +1644,8 @@ public function configure_rspamd() {
16441644
$tpl = new tpl();
16451645
$tpl->newTemplate('rspamd_worker-controller.inc.master');
16461646
$tpl->setVar('rspamd_password', $mail_config['rspamd_password']);
1647-
wf('/etc/rspamd/local.d/worker-controller.inc', $tpl->grab());
1647+
wf('/etc/rspamd/local.d/worker-controller.inc', $tpl->grab());
1648+
chmod('/etc/rspamd/local.d/worker-controller.inc', 0644);
16481649
}
16491650

16501651
public function configure_spamassassin() {

server/plugins-available/postfix_server_plugin.inc.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ function update($event_name, $data) {
242242
$tpl->newTemplate('rspamd_worker-controller.inc.master');
243243
$tpl->setVar('rspamd_password', $rspamd_password);
244244
$app->system->file_put_contents('/etc/rspamd/local.d/worker-controller.inc', $tpl->grab());
245+
chmod('/etc/rspamd/local.d/worker-controller.inc', 0644);
245246
$app->services->restartServiceDelayed('rspamd', 'reload');
246247
}
247248

0 commit comments

Comments
 (0)