[Pkg-sympa-commits] [SCM] sympa Debian packaging branch, master, updated. debian/6.1.4_dfsg-1-16-g192cb04
Emmanuel Bouthenot
kolter at openics.org
Sun Aug 21 22:41:51 UTC 2011
The following commit has been merged in the master branch:
commit 21e2a7b311b315afbb06c492e44fd11a1eb7022e
Author: Emmanuel Bouthenot <kolter at openics.org>
Date: Sun Aug 21 21:46:31 2011 +0000
Fix the way the permissions are set in /var/spool/sympa and /var/lib/sympa (#630384)
diff --git a/debian/postinst b/debian/postinst
index f7c3dbe..a2138aa 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -107,9 +107,6 @@ if [ "$1" = "configure" ]; then
fi
## ensure permissions and ownerships are right
-chown -R root:root /usr/lib/sympa
-chown -R sympa:sympa /var/spool/sympa /var/lib/sympa
-chmod -R ug=rwX,o=X /var/spool/sympa /var/lib/sympa
if [ -e /var/log/sympa.log ] && [ ! -f /var/log/sympa.log ]; then
echo "Problem: /var/log/sympa.log already exists and it isn't a file !"
fi
@@ -289,19 +286,6 @@ if [ -n "$NEW" ]; then
echo "$NEW" >> "$conf"
fi
-chown sympa:sympa "$conf"
-chmod 0640 "$conf"
-
-# Ensure permissions and ownerships are right
-chown -R sympa:sympa /var/spool/sympa/wws* /var/lib/sympa/wws*
-chmod -R ug=rwX,o=X /var/spool/sympa/wws* /var/lib/sympa/wws*
-
-# Fix permissions on MTA tools wrappers
-chmod u+s /usr/lib/sympa/bin/aliaswrapper
-chmod u+s /usr/lib/sympa/bin/virtualwrapper
-
-find /var/lib/sympa/static_content -type f | xargs chmod 664
-
## Upgrade workaround problem in case of the old web archive
## directory does not contain any archive file and was
## removed on upgrade.
@@ -310,11 +294,31 @@ if [ ! -d /var/spool/sympa/wwsarchive ]; then
rm -f "$wwconf"~
fi
-chown sympa:sympa "$wwconf" /etc/sympa/topics.conf
-chmod 0640 "$wwconf"
+# Ensure permissions and ownerships are right
+chown sympa:sympa "$conf" "$wwconf" /etc/sympa/topics.conf
+chmod 0640 "$conf" "$wwconf"
+
+# set default permissions for sympa's data directory except static_content
+# which has to be readable by the webserver
+find /var/lib/sympa /var/spool/sympa \
+ -maxdepth 1 -type d -not -name 'static_content' | \
+ xargs chmod 0771
+
+# It's better to search files and directories with wrong owner/group and fix
+# them instead of recursively doing it, even if it's not needed (see #630384)
+find /var/spool/sympa /var/lib/sympa \
+ -not -user sympa -or -not -group sympa | \
+ xargs chown sympa:sympa
+
+# Fix permissions on MTA tools wrappers
+chmod u+s /usr/lib/sympa/bin/aliaswrapper
+chmod u+s /usr/lib/sympa/bin/virtualwrapper
-chown sympa:sympa /usr/lib/cgi-bin/sympa/wwsympa-wrapper.fcgi /usr/lib/cgi-bin/sympa/sympa_soap_server-wrapper.fcgi
-chmod 6755 /usr/lib/cgi-bin/sympa/wwsympa-wrapper.fcgi /usr/lib/cgi-bin/sympa/sympa_soap_server-wrapper.fcgi
+# Fix permissions on CGI wrappers
+chown sympa:sympa /usr/lib/cgi-bin/sympa/wwsympa-wrapper.fcgi \
+ /usr/lib/cgi-bin/sympa/sympa_soap_server-wrapper.fcgi
+chmod 6755 /usr/lib/cgi-bin/sympa/wwsympa-wrapper.fcgi \
+ /usr/lib/cgi-bin/sympa/sympa_soap_server-wrapper.fcgi
# WebServer configuration
db_get wwsympa/webserver_type
--
sympa Debian packaging
More information about the Pkg-sympa-commits
mailing list