You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
restore: folder permission are always 755, folder owner is the restore user #1108
"~/Desktop/Restore/home/jack" has permission 0755, while the real "/home/jack" has 0700
If I launch init, backup and restore as root (on the same source created by the unprivileged user):
same as before
only "/Desktop/Restore/home/jack/Source" is owned by root (not "/Desktop/Restore/home" or "~/Desktop/Restore/home/jack"), while the real "Source" and is owned by the unprivileged user
If I run init and backup as unprivileged user, but restore as root:
everything except "file" is owned by root
If I run init and backup as root, but restore as unprivileged user, everything is fine (except the first 0755 issue)
If I delete "/home/jack/Desktop/Source" and restore the snapshot to "/" to have the original source back:
the permission of "/home/jack" changes from 0700 to 0755
the operation takes too much because every file not in the snapshot is logged:
changed the title [-]`restore`: ofolder permission differ[/-][+]`restore`: folder permission are always 755, folder owner is the `backup` creator[/+]on Mar 15, 2024
changed the title [-]`restore`: folder permission are always 755, folder owner is the `backup` creator[/-][+]`restore`: folder permission are always 755, folder owner is the `restore` user[/+]on Mar 15, 2024
About permissions and owners of dirs: Can you tell which backup sources you did use? (e.g. post that part of your config file). Note that rustic only saves the correct permissions and ownership for files within that path. For example, if you backup /home/user the trees home and user won't be saved within the snapshot with correct permissions. You can run rustic ls --long to see which permissions/ownership are saved within a snapshot.
In general, if you like to restore it is mostly advisable to select a suitable subtree of your snapshot which you like to restore. In the example above, using rustic restore latest:/home/user /home/user does prevent rustic from scanning dirs except subdirs of /home/user. Also, this could be a remedy for your permission issues...
Activity
[-]`restore`: ofolder permission differ[/-][+]`restore`: folder permission are always 755, folder owner is the `backup` creator[/+][-]`restore`: folder permission are always 755, folder owner is the `backup` creator[/-][+]`restore`: folder permission are always 755, folder owner is the `restore` user[/+]aawsome commentedon Mar 23, 2024
@AlphaJack Thanks for opening this issue!
About permissions and owners of dirs: Can you tell which backup sources you did use? (e.g. post that part of your config file). Note that rustic only saves the correct permissions and ownership for files within that path. For example, if you backup
/home/userthe treeshomeanduserwon't be saved within the snapshot with correct permissions. You can runrustic ls --longto see which permissions/ownership are saved within a snapshot.In general, if you like to restore it is mostly advisable to select a suitable subtree of your snapshot which you like to restore. In the example above, using
rustic restore latest:/home/user /home/userdoes prevent rustic from scanning dirs except subdirs of/home/user. Also, this could be a remedy for your permission issues...aawsome commentedon Apr 18, 2024
@AlphaJack about permissions, I hope I explained that that this is intended behavior.
Is there anything open which prevent closing this issue?
AlphaJack commentedon Apr 18, 2024
Thank you, you were really clear! I updated my restore script to reflect this behavior.