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

Mounting with fstab incorrectly assigns gocryptfs.diriv root owner #539

Closed
BickerKFR opened this issue Jan 6, 2021 · 2 comments
Closed

Comments

@BickerKFR
Copy link

Following the standard wiki setup of fstab call (and looking through existing issues like #45 #387 for clues) I could successfully setup gocryptfs properly to mount via fstab on Ubuntu 20.04.

However, despite using force_owner the contents of any subfolders were always "owned" by the "root" user, not "me". It seems that the init of the primary root directory and all files are correctly owned by "me", and the gocryptfs.diriv is set to read-only in all subdirectories as well, as documented. But any subfolder there-in gets incorrectly owned by root due to the fuse mount and thus I can't do common file actions because my account doesn't have permissions.

Example:

./secured/gocryptfs.conf <= owned by me
./secured/gocryptfs.diriv <= owned by me, RO
./secured/d52km1ZmIIRVCLveOLgHQQ/gocryptfs.diriv <= owned by root, RO
./secured/d52km1ZmIIRVCLveOLgHQQ/AqYsBUKU3WuBHh8qkHksdw <= owned by me

I think there's a bug here (tried both 1.7.1 and 2.0-beta2) with subdirectories not properly chown the diriv file when mounted by root. It works fine if I mount manually without fstab, and if I don't use any subdirectories.

The workaround for now is just to mount without fstab and use a startup script instead, but I'd like to use gocryptfs in more workflows which would may benefit from working as mounted by root.

@davidde
Copy link

davidde commented Jan 7, 2021

I've run into this too. It is really annoying in combination with Dropbox, because Dropbox keeps throwing popups to run as super user. I've been breaking my head over this until I checked the issues here. It would be really nice if this could get fixed.

@rfjakob
Copy link
Owner

rfjakob commented Jan 9, 2021

Well that's no good :)

Will check

rfjakob added a commit that referenced this issue Jan 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants