fix(01-05): retain executable permissions in offline copies

Preserve source read/write/execute bits without privileged mode bits. Verify copied Linux apphost byte identity and permissions.
This commit is contained in:
UnixNight committed 2026-11-13 11:43:51 -05:00
1 parent 857466568d
commit aa4b862a12
2 files changed
+11

No files matched your search

+3
View File
@@ -35,6 +35,9 @@ def _copy_file(source, target):
shutil.copyfile(source, target)
if identify_file(source) != identify_file(target):
raise ValueError('Source changed during copy: ' + str(source))
# Byte-identical Unix apphosts still need their source execution permission.
# Do not propagate setuid/setgid/sticky bits into a generated checkpoint.
target.chmod(Path(source).stat().st_mode & 0o777)
def _copy_tree(source, target):