From 3aa38bc07f84f452d70757585ef2620ee60ee227 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 11 Sep 2015 11:26:59 -0400 Subject: [PATCH] make /var/run/ceph 770 ceph:ceph This allows members of the ceph group to make librados clients (like the ceph cli and qemu) create sockets in the default /var/run/ceph/* location. Signed-off-by: Sage Weil --- ceph.spec.in | 2 +- src/init-ceph.in | 2 +- src/upstart/ceph-mds.conf | 2 +- src/upstart/ceph-mon.conf | 2 +- src/upstart/ceph-osd.conf | 2 +- src/upstart/radosgw.conf | 2 +- systemd/ceph.tmpfiles.d | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ceph.spec.in b/ceph.spec.in index 4e864f3fa2fcd..149ed406f4d1a 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -816,7 +816,7 @@ mkdir -p %{_localstatedir}/run/ceph/ %attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-osd %attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-mds %attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-rgw -%attr(750,ceph,ceph) %dir %{_localstatedir}/run/ceph +%attr(770,ceph,ceph) %dir %{_localstatedir}/run/ceph ################################################################################# %files -n ceph-common diff --git a/src/init-ceph.in b/src/init-ceph.in index 4255c550a434d..faeb7bd76d6ca 100755 --- a/src/init-ceph.in +++ b/src/init-ceph.in @@ -381,7 +381,7 @@ for name in $what; do echo Starting Ceph $name on $host... if [ ! -d $run_dir ]; then # assume /var/run exists - install -d -m0755 -o ceph -g ceph /var/run/ceph + install -d -m0770 -o ceph -g ceph /var/run/ceph fi get_conf pre_start_eval "" "pre start eval" [ -n "$pre_start_eval" ] && $pre_start_eval diff --git a/src/upstart/ceph-mds.conf b/src/upstart/ceph-mds.conf index 5c74fc16b2e0f..7c691173927c0 100644 --- a/src/upstart/ceph-mds.conf +++ b/src/upstart/ceph-mds.conf @@ -13,7 +13,7 @@ pre-start script test -x /usr/bin/ceph-mds || { stop; exit 0; } test -d "/var/lib/ceph/mds/${cluster:-ceph}-$id" || { stop; exit 0; } - install -d -m0755 -o ceph -g ceph /var/run/ceph + install -d -m0770 -o ceph -g ceph /var/run/ceph end script instance ${cluster:-ceph}/$id diff --git a/src/upstart/ceph-mon.conf b/src/upstart/ceph-mon.conf index be4e0efad60f7..89119457b9c28 100644 --- a/src/upstart/ceph-mon.conf +++ b/src/upstart/ceph-mon.conf @@ -13,7 +13,7 @@ pre-start script test -x /usr/bin/ceph-mon || { stop; exit 0; } test -d "/var/lib/ceph/mon/${cluster:-ceph}-$id" || { stop; exit 0; } - install -d -m0755 -o ceph -g ceph /var/run/ceph + install -d -m0770 -o ceph -g ceph /var/run/ceph end script instance ${cluster:-ceph}/$id diff --git a/src/upstart/ceph-osd.conf b/src/upstart/ceph-osd.conf index a508b4126274c..02ca2389a17b5 100644 --- a/src/upstart/ceph-osd.conf +++ b/src/upstart/ceph-osd.conf @@ -13,7 +13,7 @@ pre-start script test -x /usr/bin/ceph-osd || { stop; exit 0; } test -d "/var/lib/ceph/osd/${cluster:-ceph}-$id" || { stop; exit 0; } - install -d -m0755 -o ceph -g ceph /var/run/ceph + install -d -m0770 -o ceph -g ceph /var/run/ceph /usr/libexec/ceph/ceph-osd-prestart.sh --cluster="${cluster:-ceph}" -i "$id" end script diff --git a/src/upstart/radosgw.conf b/src/upstart/radosgw.conf index 4cb6b5d08db25..828c314d2386d 100644 --- a/src/upstart/radosgw.conf +++ b/src/upstart/radosgw.conf @@ -13,7 +13,7 @@ pre-start script test -x /usr/bin/radosgw || { stop; exit 0; } test -d "/var/lib/ceph/radosgw/${cluster:-ceph}-$id" || { stop; exit 0; } - install -d -m0755 -o ceph -g ceph /var/run/ceph + install -d -m0770 -o ceph -g ceph /var/run/ceph end script instance ${cluster:-ceph}/$id diff --git a/systemd/ceph.tmpfiles.d b/systemd/ceph.tmpfiles.d index d2a7aa1b5136b..f068e268a133a 100644 --- a/systemd/ceph.tmpfiles.d +++ b/systemd/ceph.tmpfiles.d @@ -1 +1 @@ -d /var/run/ceph 0755 ceph ceph - +d /var/run/ceph 0770 ceph ceph - -- 2.39.5