summaryrefslogtreecommitdiffstats
path: root/debian/radosgw.postinst
diff options
context:
space:
mode:
authorSage Weil <sage@redhat.com>2015-04-24 19:28:31 +0200
committerSage Weil <sage@redhat.com>2015-08-27 02:34:14 +0200
commit6532e1c48656b37c59185cb7bd3840fac008050f (patch)
treeb7c5c1299178831bb8a13a880bee52a914e0bca4 /debian/radosgw.postinst
parentsystemd: chown ceph:ceph /var/run/ceph (diff)
downloadceph-6532e1c48656b37c59185cb7bd3840fac008050f.tar.xz
ceph-6532e1c48656b37c59185cb7bd3840fac008050f.zip
debian: fix /var/lib/ceph/* directory ownership
These dirs are owned by the package; make sure they are owend by the ceph user. Signed-off-by: Sage Weil <sage@redhat.com>
Diffstat (limited to 'debian/radosgw.postinst')
-rw-r--r--debian/radosgw.postinst8
1 files changed, 8 insertions, 0 deletions
diff --git a/debian/radosgw.postinst b/debian/radosgw.postinst
index f3468bc60bf..07e3ec30b6d 100644
--- a/debian/radosgw.postinst
+++ b/debian/radosgw.postinst
@@ -24,10 +24,18 @@ set -e
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
+[ -f "/etc/default/ceph" ] && . /etc/default/ceph
+[ -z "$SERVER_USER" ] && SERVER_USER=ceph
+[ -z "$SERVER_GROUP" ] && SERVER_GROUP=ceph
case "$1" in
configure)
[ -x /sbin/start ] && start radosgw-all || :
+
+ if ! dpkg-statoverride --list /var/lib/ceph/radosgw >/dev/null
+ then
+ chown $SERVER_USER:$SERVER_GROUP /var/lib/ceph/radosgw
+ fi
;;
abort-upgrade|abort-remove|abort-deconfigure)
: