Skip to content

Commit f5b7157

Browse files
author
Marius Burkard
committed
Merge branch '6119-umask-in-updater-bad-etc-rspamd-local-d-maps-d-permission' into 'develop'
Resolve "umask in updater (bad /etc/rspamd/local.d/maps.d/ permission)" Closes #6119 See merge request ispconfig/ispconfig3!1458
2 parents 69b6297 + b801952 commit f5b7157

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

install/lib/installer_base.lib.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1803,14 +1803,17 @@ public function configure_rspamd() {
18031803

18041804
if(!is_dir('/etc/rspamd/local.d/')){
18051805
mkdir('/etc/rspamd/local.d/', 0755, true);
1806+
chmod('/etc/rspamd/local.d/', 0755);
18061807
}
18071808

18081809
if(!is_dir('/etc/rspamd/local.d/maps.d/')){
18091810
mkdir('/etc/rspamd/local.d/maps.d/', 0755, true);
1811+
chmod('/etc/rspamd/local.d/maps.d/', 0755);
18101812
}
18111813

18121814
if(!is_dir('/etc/rspamd/override.d/')){
18131815
mkdir('/etc/rspamd/override.d/', 0755, true);
1816+
chmod('/etc/rspamd/override.d/', 0755);
18141817
}
18151818

18161819
if ( substr($mail_config['dkim_path'], strlen($mail_config['dkim_path'])-1) == '/' ) {

server/scripts/update_runner.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,12 @@ cd /tmp
4040
if [ -n "${_UPD}" ]
4141
then
4242
{
43+
save_umask=`umask`
4344
umask 0077 \
4445
&& tmpdir=`mktemp -dt "$(basename $0).XXXXXXXXXX"` \
4546
&& test -d "${tmpdir}" \
4647
&& cd "${tmpdir}"
48+
umask $save_umask
4749
} || {
4850
echo 'mktemp failed'
4951
exit 1

0 commit comments

Comments
 (0)