Commit f5b71570 authored by Marius Burkard's avatar Marius Burkard
Browse files

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
parents 69b62973 b8019529
......@@ -1803,14 +1803,17 @@ class installer_base {
if(!is_dir('/etc/rspamd/local.d/')){
mkdir('/etc/rspamd/local.d/', 0755, true);
chmod('/etc/rspamd/local.d/', 0755);
}
if(!is_dir('/etc/rspamd/local.d/maps.d/')){
mkdir('/etc/rspamd/local.d/maps.d/', 0755, true);
chmod('/etc/rspamd/local.d/maps.d/', 0755);
}
if(!is_dir('/etc/rspamd/override.d/')){
mkdir('/etc/rspamd/override.d/', 0755, true);
chmod('/etc/rspamd/override.d/', 0755);
}
if ( substr($mail_config['dkim_path'], strlen($mail_config['dkim_path'])-1) == '/' ) {
......
......@@ -40,10 +40,12 @@ cd /tmp
if [ -n "${_UPD}" ]
then
{
save_umask=`umask`
umask 0077 \
&& tmpdir=`mktemp -dt "$(basename $0).XXXXXXXXXX"` \
&& test -d "${tmpdir}" \
&& cd "${tmpdir}"
umask $save_umask
} || {
echo 'mktemp failed'
exit 1
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment