Skip to content

Commit b23a3cc

Browse files
author
Andrei Neagu
committed
attempt to fix permissions issue
1 parent c1f42b1 commit b23a3cc

File tree

1 file changed

+10
-5
lines changed
  • services/agent/src/simcore_service_agent/services

1 file changed

+10
-5
lines changed

services/agent/src/simcore_service_agent/services/backup.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,16 @@ async def _get_self_container() -> str:
136136

137137
async def _ensure_permissions_on_source_dir(source_dir: Path) -> None:
138138
self_container = await _get_self_container()
139-
await run_command_in_container(
140-
self_container,
141-
command=f"chmod -R a+rX '{source_dir}'",
142-
timeout=_TIMEOUT_PERMISSION_CHANGES.total_seconds(),
143-
)
139+
for command in (
140+
# files will be removed, grant full access to all users
141+
f"chown -R root:root '{source_dir}'",
142+
f"chmod -R 0777 '{source_dir}'",
143+
):
144+
await run_command_in_container(
145+
self_container,
146+
command=command,
147+
timeout=_TIMEOUT_PERMISSION_CHANGES.total_seconds(),
148+
)
144149

145150

146151
async def _store_in_s3(

0 commit comments

Comments
 (0)