Restic: Restic Mount - Be More Vocal Regarding Permission Issues

Created on 17 Apr 2018  ·  3Comments  ·  Source: restic/restic

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!

mount wanted need feedback need implementing bug

Most helpful comment

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

All 3 comments

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

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?

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ikarlo picture ikarlo  ·  4Comments

reallinfo picture reallinfo  ·  4Comments

christian-vent picture christian-vent  ·  3Comments

kontakm picture kontakm  ·  4Comments

jpic picture jpic  ·  3Comments