Created
September 20, 2018 14:01
-
-
Save dcragusa/c430f1f53fbce7d7d81d81de963bba21 to your computer and use it in GitHub Desktop.
Make a 775 directory on the filesystem (all perms for owner and group, read/execute for everyone else)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def make_775_dir(dir_fp: str): | |
original_umask = os.umask(0) | |
try: | |
os.makedirs(dir_fp, mode=0o775, exist_ok=True) | |
except IOError: | |
# weird folder permission issues | |
pass | |
finally: | |
os.umask(original_umask) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment