Skip to content

Commit

Permalink
switched to using umask before create
Browse files Browse the repository at this point in the history
  • Loading branch information
emoscardini committed Nov 9, 2023
1 parent 28e2d5a commit 9dcb923
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ziti_router_auto_enroll.py
Original file line number Diff line number Diff line change
Expand Up @@ -1126,6 +1126,7 @@ def handle_resolved_dns(args):
"""
if not os.path.exists("/usr/lib/systemd/resolved.conf.d"):
try:
os.umask(0o022)
os.makedirs("/usr/lib/systemd/resolved.conf.d")
except OSError:
logging.error("Unable to create resolve directories")
Expand Down Expand Up @@ -1224,7 +1225,8 @@ def install_ziti_binaries(file_to_extract, install_dir):
try:
logging.debug("Attempting to create diretory: %s", f'{install_dir}/certs')
if not os.path.isdir(f'{install_dir}/certs'):
os.makedirs(f'{install_dir}/certs', exist_ok=True, mode=0o755)
os.umask(0o022)
os.makedirs(f'{install_dir}/certs', exist_ok=True)
logging.debug("Successfully created directory")
except OSError:
logging.error("Unable to create install dir")
Expand Down

0 comments on commit 9dcb923

Please sign in to comment.