From: Sage Weil Date: Fri, 25 Oct 2019 21:24:40 +0000 (-0500) Subject: ceph-daemon: os.makedirs X-Git-Tag: v15.1.0~1129^2~5 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=4330502768e1ab16dd164831afdf45ea31520455;p=ceph-ci.git ceph-daemon: os.makedirs Signed-off-by: Sage Weil --- diff --git a/src/ceph-daemon b/src/ceph-daemon index 30f3d211cd3..6f0199ab9b5 100755 --- a/src/ceph-daemon +++ b/src/ceph-daemon @@ -164,7 +164,10 @@ def is_fsid(s): return True def makedirs(dir, uid, gid, mode): - os.makedirs(dir, exist_ok=True, mode=mode) + if not os.path.exists(dir): + os.makedirs(dir, mode=mode) + else: + os.chmod(dir, mode) os.chown(dir, uid, gid) os.chmod(dir, mode) # the above is masked by umask...