mirror of https://github.com/ceph/ceph
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>
This commit is contained in:
parent
b8893f6b8a
commit
6532e1c486
|
@ -18,10 +18,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 ceph-mds-all || :
|
||||
|
||||
if ! dpkg-statoverride --list /var/lib/ceph/mds >/dev/null
|
||||
then
|
||||
chown $SERVER_USER:$SERVER_GROUP /var/lib/ceph/mds
|
||||
fi
|
||||
;;
|
||||
abort-upgrade|abort-remove|abort-deconfigure)
|
||||
:
|
||||
|
|
|
@ -24,11 +24,22 @@ 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)
|
||||
rm -f /etc/init/ceph.conf
|
||||
[ -x /sbin/start ] && start ceph-all || :
|
||||
|
||||
# adjust file and directory permissions
|
||||
for DIR in /var/lib/ceph/* ; do
|
||||
if ! dpkg-statoverride --list $DIR >/dev/null
|
||||
then
|
||||
chown $SERVER_USER:$SERVER_GROUP $DIR
|
||||
fi
|
||||
done
|
||||
;;
|
||||
abort-upgrade|abort-remove|abort-deconfigure)
|
||||
:
|
||||
|
|
|
@ -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)
|
||||
:
|
||||
|
|
Loading…
Reference in New Issue