Package: redis-server
Version: 2:2.8.13-1
Severity: normal
Tags: patch
--- Please enter the report below this line. ---
Dear Maintainer
The systemd service for the redis-server package does not set the
user/group parameters and is therefore started as root.
The attached patch makes the systemd service behave the same way as
the sysv init script.
Additionally permissions on existing files are fixed in the postinst
script.
Kind regards,
Philipp
--- System information. ---
Architecture: amd64
Kernel: Linux 3.14-1-amd64
Debian Release: jessie/sid
500 unstable ftp.ch.debian.org
1 experimental ftp.ch.debian.org
--- Package information. ---
Depends (Version) | Installed
======================================-+-===============
init-system-helpers (>= 1.18~) | 1.20
libc6 (>= 2.14) | 2.19-7
libjemalloc1 (>= 2.1.1) | 3.6.0-2
redis-tools (= 2:2.8.13-1) | 2:2.8.13-1
adduser | 3.113+nmu3
Package's Recommends field is empty.
Package's Suggests field is empty.
diff -uNr orig/redis-server.postinst debian/redis-server.postinst
--- orig/redis-server.postinst 2014-07-31 13:51:46.612965384 +0200
+++ debian/redis-server.postinst 2014-07-31 13:51:59.673209418 +0200
@@ -17,7 +17,7 @@
for DIR in /var/lib/redis /var/log/redis
do
mkdir -p ${DIR}
- chown ${USER}:${GROUP} ${DIR}
+ chown -R ${USER}:${GROUP} ${DIR}
done
;;
diff -uNr orig/redis-server.service debian/redis-server.service
--- orig/redis-server.service 2014-07-31 13:48:28.865255072 +0200
+++ debian/redis-server.service 2014-07-31 13:48:49.909651316 +0200
@@ -7,6 +7,8 @@
ExecStart=/usr/bin/redis-server /etc/redis/redis.conf
ExecStop=/usr/bin/redis-cli shutdown
Restart=always
+User=redis
+Group=redis
[Install]
WantedBy=multi-user.target