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

Restic Mount - Be More Vocal Regarding Permission Issues #1724

Closed
stevesbrain opened this issue Apr 17, 2018 · 3 comments
Closed

Restic Mount - Be More Vocal Regarding Permission Issues #1724

stevesbrain opened this issue Apr 17, 2018 · 3 comments
Labels
category: mount help: wanted state: need feedback waiting for feedback, e.g. from the submitter state: need implementing cause/request established, need work/solution type: bug

Comments

@stevesbrain
Copy link

Output of restic version

restic 0.8.3
compiled with go1.10.1 on linux/amd64

How did you run restic exactly?

sudo mkdir /mnt/restic-b2
--------
:: [stephen@waddleduck] ~
$ ls -ls /mnt
total 12
4 drwxr-xr-x  2 root root 4096 Apr 17 22:13 restic-b2
----------
export B2_ACCOUNT_KEY=XXXXX
export B2_ACCOUNT_ID=YYYYYYY
export RESTIC_PASSWORD=ZZZZZZZz
cd ~/
restic -r b2:bucket-name:/ mount /mnt/restic-b2
------------------
password is correct
*hit CTRL+C at this point after waiting about 7 minutes*
  signal interrupt received, cleaning up
context canceled, ignoring
fusermount: exit status 1
also, the following messages were logged by a library:
2018/04/17 22:18:21 mount helper error: fusermount: user has no write access to mountpoint /mnt/restic-b2
unable to umount (maybe already umounted?): exit status 1: fusermount: entry for /mnt/restic-b2 not found in /etc/mtab
-----------------------
:: [stephen@waddleduck] ~
$ sudo chown stephen:stephen /mnt/restic-b2
-------------
[sudo] password for stephen:
:: [stephen@waddleduck] ~
$ restic -r b2:bucket-name:/ mount /mnt/restic-b2
------------
password is correct
Now serving the repository at /mnt/restic-b2
Don't forget to umount after quitting!

What backend/server/service did you use to store the repository?

Backblaze B2

Expected behavior

Restic should warn you on the command line that the repository couldn't be mounted due to permissions issues.

Actual behavior

Restic does not inform you of this until you "cancel" after waiting for a confirmation of mounting (which is not received). Then, the user is informed as a "mount helper error".

Steps to reproduce the behavior

Make a new directory which your user account does not have write access to, and try mounting to it. Then, after waiting some time (to confirm it won't mount), Ctrl+c, and you will see what happens.

Do you have any idea what may have caused this?

Presumably just that nobody thought it would be necessary to generate such a message at this point :)

Do you have an idea how to solve the issue?

Catch the error and display relevant info to the user.

Did restic help you or made you happy in any way?

Absolutely; every day :D Restic is life!

@fd0
Copy link
Member

fd0 commented May 5, 2018

Ah, interesting corner case. We need to rework the user interface around restic mount anyway. Thanks for the report!

@MichaelEischer MichaelEischer added state: need implementing cause/request established, need work/solution help: wanted category: mount and removed category: mount labels Oct 5, 2020
kitone added a commit to kitone/restic that referenced this issue Oct 11, 2020
kitone added a commit to kitone/restic that referenced this issue Oct 11, 2020
kitone added a commit to kitone/restic that referenced this issue Oct 17, 2020
@MichaelEischer
Copy link
Member

MichaelEischer commented Oct 17, 2020

I've just tested this on macOS 10.15 and Ubuntu 20.04, and this issue does not reproduce on either of these systems (even with the official restic 0.8.3 binary. restic immediately prints the fusermount error for me.
@stevesbrain Are you still able to reproduce this issue? Also with restic 0.10.0?

@MichaelEischer MichaelEischer added the state: need feedback waiting for feedback, e.g. from the submitter label Oct 17, 2020
@MichaelEischer
Copy link
Member

Closing this issue for now, as it doesn't seem to be reproducible. Feel free to comment if you can reproduce the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: mount help: wanted state: need feedback waiting for feedback, e.g. from the submitter state: need implementing cause/request established, need work/solution type: bug
Projects
None yet
Development

No branches or pull requests

3 participants