Explicitly call chmod on newly created directories

Without calling os.chmod(), umask is effective and may cause that
directory is created with permission that causes failure.

This can be related to https://fedorahosted.org/freeipa/ticket/5520

Reviewed-By: Tomas Babej <tbabej@redhat.com>
This commit is contained in:
Martin Basti
2015-12-14 14:57:26 +01:00
committed by Tomas Babej
parent 5e2cd38ab9
commit 4272ba40ea
5 changed files with 14 additions and 8 deletions
+1
View File
@@ -420,6 +420,7 @@ class SystemdService(PlatformService):
try:
if not ipautil.dir_exists(srv_tgt):
os.mkdir(srv_tgt)
os.mkdir(srv_tgt, 0o755)
if os.path.exists(srv_lnk):
# Remove old link
os.unlink(srv_lnk)