Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Ian Eiloart
Sympl
Commits
4f62cfef
Commit
4f62cfef
authored
Jul 02, 2019
by
Paul Cammish
Browse files
Adjusted exim permissions
parent
f1c9104c
Changes
2
Hide whitespace changes
Inline
Side-by-side
core/sbin/sympl-filesystem-security
View file @
4f62cfef
...
...
@@ -103,7 +103,7 @@ Require valid-user" > "${domain}/public/htdocs/stats/.htaccess"
if
[
-d
${
domain
}
/config
]
;
then
find
"
${
domain
}
/config"
\(
-type
f
-o
-type
d
\)
\(
!
-user
sympl
-o
!
-group
sympl
\)
!
-name
'dkim.key'
!
-name
'dkim'
!
-path
'*ssl/sets*'
-exec
chown
sympl:sympl
{}
\;
find
"
${
domain
}
/config"
\(
-type
f
-o
-type
d
\)
\(
!
-user
sympl
-o
!
-group
sympl
\)
!
-path
'*ssl/sets*'
-exec
chown
sympl:sympl
{}
\;
if
[
-d
"
${
domain
}
/config/ssl/sets"
]
;
then
find
"
${
domain
}
/config/ssl/sets"
\(
!
-user
sympl
-o
!
-group
ssl-cert
\)
-exec
chown
sympl:ssl-cert
{}
\;
...
...
@@ -111,12 +111,6 @@ Require valid-user" > "${domain}/public/htdocs/stats/.htaccess"
find
"
${
domain
}
/config"
\(
-type
f
-a
!
-perm
660
-exec
chmod
660
{}
\;
\)
-o
\(
-type
d
-a
!
-perm
2771
-exec
chmod
2771
{}
\;
\)
# The group doesn't exist if exim/sympl-mail is not installed.
if
[
$(
grep
-c
'^Debian-exim:'
/etc/group
)
==
1
]
;
then
find
"
${
domain
}
/config"
-maxdepth
1
-type
f
\(
-name
'dkim'
-o
-name
'dkim.key'
\)
\(
!
-group
Debian-exim
-o
!
-user
sympl
\)
-exec
chown
sympl:Debian-exim
{}
\;
find
"
${
domain
}
/config"
-maxdepth
1
-type
f
\(
-name
'dkim'
-o
-name
'dkim.key'
\)
!
-perm
640
-exec
chmod
640
{}
\;
fi
fi
# Enforce permissions for mailboxes directory
...
...
@@ -124,7 +118,7 @@ Require valid-user" > "${domain}/public/htdocs/stats/.htaccess"
find
"
${
domain
}
/mailboxes"
\(
-type
f
-o
-type
d
\)
\(
!
-user
sympl
-o
!
-group
sympl
\)
-exec
chown
sympl:sympl
{}
\;
find
"
${
domain
}
/mailboxes"
\(
-type
f
-a
!
-perm
660
-exec
chmod
6
0
0
{}
\;
\)
-o
\(
-type
d
-a
!
-perm
27
0
0
-exec
chmod
27
0
0
{}
\;
\)
find
"
${
domain
}
/mailboxes"
\(
-type
f
-a
!
-perm
660
-exec
chmod
6
6
0
{}
\;
\)
-o
\(
-type
d
-a
!
-perm
27
7
0
-exec
chmod
27
7
0
{}
\;
\)
fi
...
...
mail/debian/postinst
View file @
4f62cfef
...
...
@@ -42,6 +42,15 @@ if ! ( groups Debian-exim | grep -q ssl-cert ) ; then
adduser Debian-exim ssl-cert
>
/dev/null 2>&1
fi
#
# Debian-exim also needs to be part of the sympl group, so it can read the
# files in <domain>/config/.
#
if
!
(
groups
Debian-exim |
grep
-q
sympl
)
;
then
echo
"I: Adding Debian-exim user to sympl group"
adduser Debian-exim sympl
>
/dev/null 2>&1
fi
if
(
grep
-q
'^AllowSupplementaryGroups \+false'
/etc/clamav/clamd.conf
)
;
then
echo
"I: Allowing clamav to operate using its supplementary groups"
#
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment