file modes with archive handlers are always preserved, as tested with
a tar file including the following files:
$ tar tvf test.tar
-r-------- 0/0 0 2025-09-24 14:51 test_mode_400
-rw------- 0/0 0 2025-09-24 14:51 test_mode_600
-rwx------ 0/0 0 2025-09-24 14:51 test_mode_700
-rw-r----- 0/0 0 2025-09-24 14:51 test_mode_640
-rw-r--r-- 0/0 0 2025-09-24 14:51 test_mode_644
-rwxr-x--- 0/0 0 2025-09-24 14:51 test_mode_750
-rwxr-xr-x 0/0 0 2025-09-24 14:51 test_mode_755
armadillo:~# ls -l test_mo*
-r-------- 1 root root 0 Sep 24 14:52 test_mode_400
-rw------- 1 root root 0 Sep 24 14:52 test_mode_600
-rw-r----- 1 root root 0 Sep 24 14:52 test_mode_640
-rw-r--r-- 1 root root 0 Sep 24 14:52 test_mode_644
-rwx------ 1 root root 0 Sep 24 14:52 test_mode_700
-rwxr-x--- 1 root root 0 Sep 24 14:52 test_mode_750
-rwxr-xr-x 1 root root 0 Sep 24 14:52 test_mode_755
---
I stumbled upon this:
https://sbabic.github.io/swupdate/handlers.html
> The attribute preserve-attributes must be set to preserve timestamps.
> uid/gid (numeric), permissions (except +x, always preserved) and
> extended attributes.
but that looked wrong to me, as rechecked just now.
I didn't recheck the user, but the rest should be correct.
doc/source/handlers.rst | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/doc/source/handlers.rst b/doc/source/handlers.rst
index 2efff0d4892c..ec3c9418a549 100644
--- a/doc/source/handlers.rst
+++ b/doc/source/handlers.rst
@@ -1043,8 +1043,8 @@ The archive handler extracts an archive to a destination path.
It supports whatever format libarchive has been compiled to support, for example even if SWUpdate
itself has no direct support for xz it can be possible to extract tar.xz files with it.
-The attribute `preserve-attributes` must be set to preserve timestamps. uid/gid (numeric),
-permissions (except +x, always preserved) and extended attributes.
+The attribute `preserve-attributes` must be set to preserve timestamps. uid/gid (numeric) and
+extended attributes. File modes (such as chmod 0755/0600) are always preserved.
The property `create-destination` can be set to the string `true` to have SWUpdate create
the destination path before extraction.
--
2.47.3