From e2f5df38ceb8b504ad4842599d7ade6cff668719 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 9 Mar 2021 11:56:42 -0600 Subject: [PATCH] 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) --- debian/ceph-common.postinst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/ceph-common.postinst b/debian/ceph-common.postinst index b9d382aaaa914..0abcf4f82ae6a 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 -- 2.39.5