borgbackup / borg

Deduplicating archiver with compression and authenticated encryption.
https://www.borgbackup.org/
Other
11.14k stars 742 forks source link

Restored from Borg mount --> executable file permission not preserved #5996

Open geckolinux opened 3 years ago

geckolinux commented 3 years ago

Hi I'm using Borg 1.1.17 on openSUSE Tumbleweed. When restoring files from a borg mount and browsing the mounted archive with the file manager, the files have their former permissions, including the +x executable bit. But when copying the folder to the target system, executable permissions are lost. Is this a FUSE limitation, or a Borg decision, or is it at the operating system level? Thanks a lot for the help.

ThomasWaldmann commented 3 years ago

This sounds like a problem of the software you used for copying.

rsync -avH is a quite good "copy program".

geckolinux commented 3 years ago

@ThomasWaldmann Thanks for the reply. I thought of that too, but I tried copying a directory from/to my local filesystem and it preserved all the executable bits. (Nemo file manager for Cinnamon desktop.)

ThomasWaldmann commented 3 years ago

BTW, are you running the copy as root?

geckolinux commented 3 years ago

Hmm, no, although the files originally belonged to my same user account (UID 1000), so it seems like it shouldn't matter.

ThomasWaldmann commented 3 years ago

How is the target fs mounted (fs type and mount options in mount output)?

geckolinux commented 3 years ago

borg mount myself@192.168.1.9:/srv/dev-disk-by-label-BtrFS-RAID1/Borg /mnt/manual/

Also tried borg mount -o ignore_permissions myself@192.168.1.9:/srv/dev-disk-by-label-BtrFS-RAID1/Borg /mnt/manual/

ThomasWaldmann commented 3 years ago

Thanks, but I meant the (copy) target fs.

geckolinux commented 3 years ago

Ah sorry, it's a Btrfs volume:

UUID=b542f3b6-a328-4822-ac8c-a0b40b718d19 /home btrfs subvol=@home,defaults,noatime,space_cache,autodefrag,compress=zstd 0 2

ThomasWaldmann commented 3 years ago

Hmm, target fs mount looks OK.

geckolinux commented 3 years ago

I also tried using Nemo to copy an executable .sh file from a SMB share on my NAS, mounted to /mnt/autofs via Autofs, and it preserves the executable bit. Thanks for the help, I appreciate it.