fs: fall back to numeric ids when --ownership-by-name lookup fails (#22185)

Signed-off-by: Dean Chen <862469039@qq.com>
This commit is contained in:
Dean Chen authored and GitHub committed 2026-11-15 19:30:21 +00:00
1 parent 2126756613
commit 5cda063cbb
5 files changed
+89 -27

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
Bugfix: Fix file owner when `restore --ownership-by-name` cannot resolve a name
When restoring with `--ownership-by-name`, user or group names that could not
be resolved on the restore host (or were not recorded in the snapshot) caused
restic to change the owner of the restored file to uid/gid 0. Combined with
restored setuid/setgid bits this could produce setuid-root files.
Restic now falls back to the numeric uid/gid stored in the snapshot and prints
a warning when a name cannot be resolved.
https://github.com/restic/restic/issues/22178
https://github.com/restic/restic/pull/22185