borgbackup / borg

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

OS X: borg mount files are not accessible by finder #1126

Closed tristan-k closed 8 years ago

tristan-k commented 8 years ago

Mounting the borg repo works fine but the actual files stored inside are not accessible. In the mac os x finder (file browser) they all have a size of 0 Byte. Trying to copy one file outside the fuse volume results in a Error -36.

$ borg --version
borg 1.0.4.dev273+ngbf5406d
$ borg mount --foreground ~/Desktop/borg-repo ~/Desktop/BorgBackup

The bounty is for finding the root cause of this issue and showing a way to fix it. A PR with a fix would be welcome (if major work, bounty could be increased / new bounty filed for the code).

:moneybag: there is a bounty for this

ThomasWaldmann commented 8 years ago

Some minutes ago I tried borg mount on OS X with osxfuse 3.2.0 and it worked. File sizes correct, files readable. I didn't use the GUI / finder, but ssh and a shell, in case that matters.

So, did they do incompatible changes? Or introduce a regression?

tristan-k commented 8 years ago

This must be related to the Finder. I did browse into the mounted repo with a terminal and the files are accessible there.

ThomasWaldmann commented 8 years ago

Maybe there should be a ticket about this in the osxfuse tracker - can you file one there?

tristan-k commented 8 years ago

I've just opened a ticket at https://github.com/osxfuse/osxfuse/issues/288

tristan-k commented 8 years ago

I think this is something the Borg team needs to investigate. The loopback reference file system works fine with osxfuse 3.3.2. Finder acting up can mean that the root user does not have access to the volume.

Quote

ThomasWaldmann commented 8 years ago

@tristan-k can you try whether 3.2.0 works with finder?

tristan-k commented 8 years ago

@ThomasWaldmann No it did not. Tried that before upgrading to latest version.

ThomasWaldmann commented 8 years ago

OK, if no borg + osxfuse version works with finder (but with shell), update issue topic and top text accordingly.

ThomasWaldmann commented 8 years ago

The hint about root user helped, i can reproduce on the shell:

(borg-env) This-MacBook-Pro:borg vagrant$ ls /vagrant/borg/mnt
borg
(borg-env) This-MacBook-Pro:borg vagrant$ sudo ls /vagrant/borg/mnt
ls: mnt: No such file or directory
ThomasWaldmann commented 8 years ago

Solved!:

(borg-env) This-MacBook-Pro:borg vagrant$ ./borg.exe mount repo::1 mnt -o allow_other
(borg-env) This-MacBook-Pro:borg vagrant$ ls /vagrant/borg/mnt
borg
(borg-env) This-MacBook-Pro:borg vagrant$ sudo ls /vagrant/borg/mnt
borg

Also possible: allow_root to just allow it for root, but nobody else.

ThomasWaldmann commented 8 years ago

Can you try this with finder?

Guess we should put a hint about this option into the docs.

tristan-k commented 8 years ago

Just did. Doesn't work in the finder.

ThomasWaldmann commented 8 years ago

@tristan-k are you in "admin" group (this is needed, otherwise "allow_other" is not allowed for you).

enkore commented 8 years ago

Q: What produces this? Default ACLs? Can't be unix permissions for sure. But even then, root should be able to override any DAC check.

tristan-k commented 8 years ago

Yes, I'am in the admin group.

ThomasWaldmann commented 8 years ago

What does error -36 (see top post) mean in that context?

ThomasWaldmann commented 8 years ago

Help wanted: we can only fix this, if we know the root cause (and how to fix it):

Why is finder not seeing files in the same was as ls -l on the shell?

tristan-k commented 8 years ago

@ThomasWaldmann I can give you remote access to my mac os x system if you like.

ThomasWaldmann commented 8 years ago

@tristan-k OK, let's meet on #borgbackup on chat.freenode.net?

ThomasWaldmann commented 8 years ago

fixed in 1.0-maint