Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't override FUSE mount permissions #436

Closed
smartm0use opened this issue Apr 7, 2020 · 34 comments
Closed

Don't override FUSE mount permissions #436

smartm0use opened this issue Apr 7, 2020 · 34 comments
Assignees
Labels
priority:low Nice to have feature, minor improvement to functionality or usability type:bug Something doesn't work as intended
Milestone

Comments

@smartm0use
Copy link

smartm0use commented Apr 7, 2020

Hello, I'm using Vorta (and borg) for the first time.
I have installed the latest version (0.6.24) and I have made a couple of backups.
Now I have two rows in the Archive section and I'm trying to mount any of them, but it seems not to work.

I click on "mount" and I select the folder, then nothing happens, I get this text:

fuse: unknown option `umask=0277'

After I have selected the folder if I double click on the archive it opens the folder but it is empty.

I'm on Ubuntu 18.04.4 LTS.

@m3nu
Copy link
Contributor

m3nu commented Apr 8, 2020

Is your FUSE too old or too new to have this option?

This option makes sure that you can read the files, even though the backup was previously done by another user with restricted perms.

@smartm0use
Copy link
Author

Do you know how to remove that option? I do not need it...

@smartm0use
Copy link
Author

smartm0use commented Apr 13, 2020

I have removed the version I installed with pip and I have installed Vorta again with flatpack.
Now I do not have that error, it now says "Mounted successfully" but when I double-click on the folder I get this error message:

image

What does it mean? What's wrong now?

If I try to mount using borg mount command in the terminal it works with no issues.

@ThomasWaldmann
Copy link
Collaborator

borgbackup/borg#5064 maybe?

@Hofer-Julian
Copy link
Collaborator

The flatpak uses llfuse-1.3.6.
@ThomasWaldmann could it still be related?

1 similar comment
@Hofer-Julian
Copy link
Collaborator

The flatpak uses llfuse-1.3.6.
@ThomasWaldmann could it still be related?

@smartm0use
Copy link
Author

smartm0use commented Apr 14, 2020

Running pip3 search llfuse on my system I get this:

llfuse (1.3.6)            - Python bindings for the low-level FUSE API
  INSTALLED: 1.3.3
  LATEST:    1.3.6
gridfs-fuse (0.1.2.dev1)  - A FUSE wrapper around MongoDB gridfs using python
                            and llfuse.

I can mount successfully if I use borg via command line. Isn't weird?

@ThomasWaldmann
Copy link
Collaborator

"Transport endpoint not connected" is a not very helpful error message.

When running borg mount -f ... in foreground one usually also sees some traceback that makes clear why the borg mount process has died (which is the reason for "not connected").

Without that traceback one can only guess...

@smartm0use
Copy link
Author

smartm0use commented Apr 14, 2020

As i said using borg mount works, with no errors.
Doing the same with Vorta gives me that error.

How can I give you more details about the error?

@m3nu
Copy link
Contributor

m3nu commented Apr 14, 2020

The precise mount command used by Vorta will be in the logs. Worth trying that directly as well. I added some stuff to make sure they are readable by the current user.

@smartm0use
Copy link
Author

I have no errors in the log file:

2020-04-14 15:19:55,880 - vorta.i18n - DEBUG - Loading translation failed for ['en', 'en-US', 'en-Latn-US'].
2020-04-14 15:19:55,967 - apscheduler.scheduler - INFO - Scheduler started
2020-04-14 15:19:57,082 - vorta.borg.borg_thread - INFO - Running command /app/bin/borg --version
2020-04-14 15:22:57,677 - vorta.borg.borg_thread - DEBUG - Using VortaSecretStorageKeyring keyring to store passwords.
2020-04-14 15:22:57,677 - asyncio - DEBUG - Using selector: EpollSelector
2020-04-14 15:22:57,685 - root - DEBUG - Found 1 passwords matching repo URL.
2020-04-14 15:23:01,481 - vorta.borg.borg_thread - INFO - Running command /app/bin/borg --log-json mount -o umask=0277,uid=1000 /media/smartmouse/50f03a25-4d6b-4134-a6ff-09be30b8706f/borg backup::smart-default-2020-04-07T20:10:46 /home/smartmouse/Desktop/my-backup

As I said before I get that error when I try to open the destination folder.
This doesn't happen if I don't use Vorta, simply using borg mount by command line.

@m3nu
Copy link
Contributor

m3nu commented Apr 14, 2020

I meant you can use the mount command from there and test it independentyl:

/app/bin/borg --log-json mount -o umask=0277,uid=1000 /media/smartmouse/50f03a25-4d6b-4134-a6ff-09be30b8706f/borg backup::smart-default-2020-04-07T20:10:46 /home/smartmouse/Desktop/my-backup

If this reproduces the error, we can change the mount command if it makes a difference.

@smartm0use
Copy link
Author

Ok, running borg --log-json mount -o umask=0277,uid=1000 /media/smartmouse/50f03a25-4d6b-4134-a6ff-09be30b8706f/borg backup::smart-default-2020-04-07T20:10:46 /home/smartmouse/Desktop/my-backup it gives me this error:

{"type": "log_message", "time": 1586871442.3481283, "message": "-: Mountpoint must be a writable directory", "levelname": "ERROR", "name": "borg.archiver"}

Instead, running borg mount /media/smartmouse/50f03a25-4d6b-4134-a6ff-09be30b8706f/borg backup/ /home/smartmouse/Desktop/my-backup/

It asks me for repository password and the it works with no problems.

Could be a permissions issue?

@m3nu
Copy link
Contributor

m3nu commented Apr 14, 2020

Could be a permissions issue?

Could be. Ever tried using Vorta from outside Snap?

@Hofer-Julian
Copy link
Collaborator

@m3nu I guess you mean flatpak? 😉

@Hofer-Julian
Copy link
Collaborator

@smartm0use what are the permissions of your mountpoint and from which user did you execute borg mount?

@smartm0use
Copy link
Author

@smartm0use what are the permissions of your mountpoint and from which user did you execute borg mount?

drwx------ 2 smartmouse smartmouse 4,0K apr 13 21:46 .
drwxr-x--- 9 smartmouse smartmouse 4,0K apr 14 00:54 ..

I just run Vorta from Ubuntu applications menu and the caption in the GUI is "Vorta for Borg Backup (as superuser)"

@Hofer-Julian
Copy link
Collaborator

As superuser?
Didn't we have this conversation already that this is not supported?

@smartm0use
Copy link
Author

I did not know. How to change it?

@smartm0use
Copy link
Author

Seems to be a bug of Mate desktop: mate-desktop/marco#301
Were you aware of this?

@smartm0use
Copy link
Author

Please look again at the first message of this issue. It seems I had a similar problem even when I installed Vorta using pip instead of flatpack. So, what's the point?

@Turako
Copy link

Turako commented Apr 19, 2020

I do see the same error when mounting an archive here using Ubuntu 18.04:

vorta.borg.borg_thread`` - INFO - Running command /usr/bin/borg --log-json mount -o umask=0277,uid=1000 /media/username/NAS/Backup/borgbackup::Ubuntu1804_Name-default_2019-10-31T21:00:00 /home/username/Downloads/test 2020-04-19 07:56:37,759 - vorta.borg.borg_thread - WARNING - fuse: unknown option `umask=0277'

If I run this command in the terminal:

/usr/bin/borg --log-json mount -o umask=0277,uid=1000 /media/username/NAS/Backup/borgbackup::Ubuntu1804_Name-default_2019-10-31T21:00:00 /home/username/Downloads/test

I've been asked for the passphrase and then I also do get the following error:

fuse: unknown option `umask=0277'

My workaround at the moment is, running this command w/o the additional mount options:

/usr/bin/borg --log-json mount /media/username/NAS/Backup/borgbackup::Ubuntu1804_Name-default_2019-10-31T21:00:00 /home/username/Downloads/test

This works for me. Umount is done by:

/usr/bin/borg --log-json umount /home/username/Downloads/test

I am using the llfuse which comes with my distro, so not the latest version:

  INSTALLED: 1.3.3
  LATEST:    1.3.6
gridfs-fuse (0.1.2.dev1)  - A FUSE wrapper around MongoDB gridfs using python and llfuse.```


@smartm0use
Copy link
Author

I do see the same error when mounting an archive here using Ubuntu 18.04:

vorta.borg.borg_thread - INFO - Running command /usr/bin/borg --log-json mount -o umask=0277,uid=1000 /media/username/NAS/Backup/borgbackup::Ubuntu1804_Name-default_2019-10-31T21:00:00 /home/username/Downloads/test 2020-04-19 07:56:37,759 - vorta.borg.borg_thread - WARNING - fuse: unknown option `umask=0277' ``

If I run this command in the terminal:

/usr/bin/borg --log-json mount -o umask=0277,uid=1000 /media/username/NAS/Backup/borgbackup::Ubuntu1804_Name-default_2019-10-31T21:00:00 /home/username/Downloads/test

I've been asked for the passphrase and then I also do get the following error:

fuse: unknown option `umask=0277'

My workaround at the moment is, running this command w/o the additional mount options:

/usr/bin/borg --log-json mount /media/username/NAS/Backup/borgbackup::Ubuntu1804_Name-default_2019-10-31T21:00:00 /home/username/Downloads/test

This works for me. Umount is done by:

/usr/bin/borg --log-json umount /home/username/Downloads/test

I am using the llfuse which comes with my distro, so not the latest version:

  INSTALLED: 1.3.3
  LATEST:    1.3.6
gridfs-fuse (0.1.2.dev1)  - A FUSE wrapper around MongoDB gridfs using python and llfuse.```

Ok, so, why should we use Vorta if I have to use command line to have borg working?

@Hofer-Julian
Copy link
Collaborator

Hofer-Julian commented Apr 19, 2020

I do see the same error when mounting an archive here using Ubuntu 18.04:
vorta.borg.borg_thread - INFO - Running command /usr/bin/borg --log-json mount -o umask=0277,uid=1000 /media/username/NAS/Backup/borgbackup::Ubuntu1804_Name-default_2019-10-31T21:00:00 /home/username/Downloads/test 2020-04-19 07:56:37,759 - vorta.borg.borg_thread - WARNING - fuse: unknown option umask=0277' `` If I run this command in the terminal: /usr/bin/borg --log-json mount -o umask=0277,uid=1000 /media/username/NAS/Backup/borgbackup::Ubuntu1804_Name-default_2019-10-31T21:00:00 /home/username/Downloads/testI've been asked for the passphrase and then I also do get the following error: `` fuse: unknown optionumask=0277' ``
My workaround at the moment is, running this command w/o the additional mount options:
/usr/bin/borg --log-json mount /media/username/NAS/Backup/borgbackup::Ubuntu1804_Name-default_2019-10-31T21:00:00 /home/username/Downloads/test
This works for me. Umount is done by:
`/usr/bin/borg --log-json umount /home/username/Downloads/test`
I am using the llfuse which comes with my distro, so not the latest version:

  INSTALLED: 1.3.3
  LATEST:    1.3.6
gridfs-fuse (0.1.2.dev1)  - A FUSE wrapper around MongoDB gridfs using python and llfuse.```

Ok, so, why should we use Vorta if I have to use command line to have borg working?

@smartm0use I will not invest time into answering you anymore as you obviously do not value the time of others who provide this software for free and tried to help you with your issue.

@smartm0use
Copy link
Author

smartm0use commented Apr 19, 2020

@Hofer-Julian Maybe you misunderstand me due my bad english.
I quoted the message @Turako that said he resolved using borg via command line instead of using GUI (Vorta). But in that way he does solve the problem simply because he was not using Vorta.
I'm sorry if you misunderstand me :(

@Turako
Copy link

Turako commented Apr 20, 2020

Good morning guys,

as I mentioned, working with the terminal is my workaround at the moment so that I am able to mount an archive.

I found this topic here after I discovered this problem on my machine. As @Hofer-Julian supposed, this may be related to the version of llfuse itself, as the flatplak is using the version 1.3.6. I will try to update my llfuse tonight in order to see if this solves the problem.

Thank you.

@smartm0use
Copy link
Author

I found this topic here after I discovered this problem on my machine. As @Hofer-Julian supposed, this may be related to the version of llfuse itself, as the flatplak is using the version 1.3.6. I will try to update my llfuse tonight in order to see if this solves the problem.

Thank you.

Any news?

@borgbase borgbase locked as too heated and limited conversation to collaborators Apr 25, 2020
@m3nu m3nu added status:needs details Needs more details before it can be solved. and removed status:needs details Needs more details before it can be solved. labels May 28, 2020
@borgbase borgbase unlocked this conversation Jun 2, 2020
@m3nu
Copy link
Contributor

m3nu commented Jun 2, 2020

Is this still an issue? Couldn't reproduce on Debian Testing. Maybe Borg or FUSE was too old.

@m3nu m3nu self-assigned this Jun 2, 2020
@smartm0use
Copy link
Author

Yes, I finally solved the issue with Vorta (installed with pip) editing the following file:

~/.local/lib/python3.6/site-packages/vorta/borg/mount.py

and removing -o parameters:

image

Now I can mount my backups with no errors.

@m3nu
Copy link
Contributor

m3nu commented Jun 5, 2020

If the umask option is not available in certain FUSE installs, we should indeed remove it.

I added it to avoid permission errors when restoring files from NAS servers with restrictive permissions.

@ThomasWaldmann
Copy link
Collaborator

@m3nu do you have more details?

umask is something evaluated within our borg.fuse module.

@m3nu
Copy link
Contributor

m3nu commented Jun 7, 2020

The Borg version shipped with Ubuntu 18.04 doesn't support the umask option yet.[2,3] The PR adding it was done 2 weeks after the release of Borg 1.1.5 on April 13, 2018.[1]

I'll add a feature flag for it, as we have with some other features.

I don't think you need to make any change in Borg, @ThomasWaldmann .

1: borgbackup/borg@eb61c21
2: https://packages.ubuntu.com/bionic/admin/borgbackup
3:

root@ip-172-26-1-77:~# borg init -e none repo
root@ip-172-26-1-77:~# borg mount -o umask=0277 repo mnt
fuse: unknown option `umask=0277'
root@ip-172-26-1-77:~# borg --version
borg 1.1.5

@m3nu m3nu changed the title Mount: fuse: unknown option `umask=0277' Feature flag for umask mount option Jun 7, 2020
@m3nu m3nu added priority:low Nice to have feature, minor improvement to functionality or usability type:bug Something doesn't work as intended and removed status:not-reproducible labels Jun 7, 2020
@m3nu m3nu changed the title Feature flag for umask mount option Don't override FUSE mount permissions Feb 15, 2021
@m3nu m3nu added this to the 0.7.3 (Next minor release) milestone Feb 15, 2021
@m3nu
Copy link
Contributor

m3nu commented Feb 18, 2021

Fixed in #682. You can now enable overriding permissions in the Misc tab. Applies to all profiles.

@m3nu m3nu closed this as completed Feb 18, 2021
@smartm0use
Copy link
Author

Glad to see it has been fixed :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:low Nice to have feature, minor improvement to functionality or usability type:bug Something doesn't work as intended
Projects
None yet
Development

No branches or pull requests

5 participants