]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
debian/ceph-common.postinst: do not chown cephadm log dirs 40698/head
authorSage Weil <sage@newdream.net>
Tue, 9 Mar 2021 17:56:42 +0000 (11:56 -0600)
committerNathan Cutler <ncutler@suse.com>
Thu, 8 Apr 2021 16:20:35 +0000 (18:20 +0200)
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 <sage@newdream.net>
(cherry picked from commit b89ffdcae51303f185e1b423a948df353497250f)

debian/ceph-common.postinst

index b9d382aaaa91465b77ed5a54b189d8cd18b00ac5..0abcf4f82ae6a220e0946fcfb1126c8749d8fb34 100644 (file)
@@ -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