Skip to content

Commit df8d58f

Browse files
committed
Use folder permissions logic from the machine config for functions in 'file_io_instrument'
1 parent f7e39b5 commit df8d58f

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

src/murfey/server/api/file_io_instrument.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,11 @@ def suggest_path(
8686
count = count + 1 if count else 2
8787
check_path = check_path.parent / f"{check_path_name}{count}"
8888
if params.touch:
89-
check_path.mkdir(mode=0o750)
89+
check_path.mkdir(mode=machine_config.mkdir_chmod)
9090
if params.extra_directory:
91-
(check_path / secure_filename(params.extra_directory)).mkdir(mode=0o750)
91+
(check_path / secure_filename(params.extra_directory)).mkdir(
92+
mode=machine_config.mkdir_chmod
93+
)
9294
return {"suggested_path": check_path.relative_to(rsync_basepath)}
9395

9496

@@ -112,7 +114,7 @@ def make_rsyncer_destination(session_id: int, destination: Dest, db=murfey_db):
112114
machine_config.rsync_basepath or Path("")
113115
).resolve() / destination_path
114116
for parent_path in full_destination_path.parents:
115-
parent_path.mkdir(mode=0o750, exist_ok=True)
117+
parent_path.mkdir(mode=machine_config.mkdir_chmod, exist_ok=True)
116118
return destination
117119

118120

0 commit comments

Comments
 (0)