From: Sage Weil Date: Tue, 9 Mar 2021 17:56:42 +0000 (-0600) Subject: debian/ceph-common.postinst: do not chown cephadm log dirs X-Git-Tag: v16.2.0~81^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F40248%2Fhead;p=ceph.git debian/ceph-common.postinst: do not chown cephadm log dirs The container uid/gid is different than the debian uid/gid (because the container is centos-based and we got a different uid/gid allocation there). Fixes: https://tracker.ceph.com/issues/49677 Signed-off-by: Sage Weil (cherry picked from commit b89ffdcae51303f185e1b423a948df353497250f) --- diff --git a/debian/ceph-common.postinst b/debian/ceph-common.postinst index b9d382aaaa91..0abcf4f82ae6 100644 --- a/debian/ceph-common.postinst +++ b/debian/ceph-common.postinst @@ -78,7 +78,9 @@ case "$1" in fi if ! dpkg-statoverride --list /var/log/ceph >/dev/null then - chown -R $SERVER_USER:$SERVER_GROUP /var/log/ceph + # take care not to touch cephadm log subdirs + chown $SERVER_USER:$SERVER_GROUP /var/log/ceph + chown $SERVER_USER:$SERVER_GROUP /var/log/ceph/*.log* || true # members of group ceph can log here, but cannot remove # others' files. non-members cannot read any logs. chmod u=rwx,g=rwxs,o=t /var/log/ceph