diff --git a/dir_verify.py b/dir_verify.py index 0f0127e50b50ebea248a89df0ad1f9a19eb2c545..23dd34183f4beefeae9cd3d88d216b43ffa9585c 100644 --- a/dir_verify.py +++ b/dir_verify.py @@ -31,7 +31,7 @@ def dir_verify(ch, method, properties, body): else: if not path.exists(): # Make sure folder exists and with right permission - path.mkdir(mode=0o700) + path.mkdir(mode=0o700, parents=True, exist_ok=True) # Make sure ownership is correct shutil.chown(path, int(msg['uid']), int(msg['gid']))