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

gocryptfs hangs when mount point is in PATH #146

Closed
redneb opened this issue Oct 17, 2017 · 2 comments
Closed

gocryptfs hangs when mount point is in PATH #146

redneb opened this issue Oct 17, 2017 · 2 comments

Comments

@redneb
Copy link

redneb commented Oct 17, 2017

When I try to mount a gocryptfs volume and the $PATH environment variable includes the mount point (or a subdirectory of it), then the gocryptfs process hangs and the mount does not complete and other processes that try to access it also hang. This can be reproduced by running the following:

mkdir /tmp/test{.enc,}
gocryptfs -extpass 'echo test' -init /tmp/test.enc
PATH=/tmp/test:"$PATH" gocryptfs -extpass 'echo test' /tmp/test{.enc,}

gocrypfs will remain in the foreground. Then on a different terminal run:

ls /tmp/test

and ls will also hang.

@redneb
Copy link
Author

redneb commented Oct 17, 2017

If you pass the -fg flag to gocryptfs, everything works correctly. So I think this has to do with how the foreground gocryptfs process executes the background gocryptfs process; presumably it tries to find gocryptfs in $PATH which includes a yet not accessible directory. If that's the case, the foreground process should find the full path of the gocryptfs executable (i.e. of itself) and then use that instead of relying on $PATH.

@rfjakob
Copy link
Owner

rfjakob commented Oct 18, 2017

Fascinating. Turns out it was the call to logger that locked everything up. logger is started after the mountpoint is attached but before the FUSE server is started - hence it hangs.

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

2 participants