cryptomator / cryptomator/cli

Graceful unmount failed when sending SIGTERM signal (fusermount3 permission denied)

Open
#85 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
427
Forks
52
Avg merge
20h 37m
Merged PRs (30d)
2

Description

### Please agree to the following

- [x] I have searched [existing issues](https://github.com/cryptomator/cli/issues?q=) for duplicates
- [x] I agree to follow this project's [Code of Conduct](https://github.com/cryptomator/cli/blob/develop/.github/CODE_OF_CONDUCT.md)

### Summary

When trying to unmount a mounted vault, a permission denied error is shown.

### What software is involved?

- Operating System: Ubuntu 24.04.1 LTS
- Cryptomator CLI: 0.6.1

### Volume Type

FUSE

### Steps to Reproduce

1. Mount the cryptomator vault:
```
./cryptomator-cli unlock --password:stdin --mounter=org.cryptomator.frontend.fuse.mount.LinuxFuseMountProvider --mountPoint=/test/cryptomator /test/cryptmator/cryptomator_vault
```
2. Unmount the cryptomator vault by pressing ctrl +c

I'm connected via a SSH client, but I don't think that matters. I'm logged in as root. It doesn't matter if I run the command with sudo or not, the error appears regardless.

### Expected Behavior

I expected the vault to be unmounted gracefully.

### Actual Behavior

The error message appears.
The target location still appears to be unmounted properly, however. At the very least the target location no longer contains any files.

### Reproducibility

Always

### Relevant Log Output

```shell
root@******:/test/cryptomator-cli/bin# ./cryptomator-cli unlock --password:stdin --mounter=org.cryptomator.frontend.fuse.mount.LinuxFuseMountProvider --mountPoint=/test/cryptomator /test/cryptomator_vault
Enter value for --password:stdin (Passphrase, read from STDIN):

[main] INFO o.c.cli.Unlock - Unlocked and mounted vault successfully to file:///test/cryptomator/
^C[Thread-2] ERROR o.c.cli.Unlock - GRACEFUL UNMOUNT FAILED. Please check if manual cleanups are necessary
org.cryptomator.integrations.mount.UnmountFailedException: java.io.IOException: Cannot run program "fusermount3" (in directory "/test"): error=13, Permission denied
at org.cryptomator.frontend.fuse@5.0.2/org.cryptomator.frontend.fuse.mount.LinuxFuseMountProvider$LinuxFuseMountBuilder$LinuxFuseMountedVolume.unmount(LinuxFuseMountProvider.java:153)
at org.cryptomator.frontend.fuse@5.0.2/org.cryptomator.frontend.fuse.mount.LinuxFuseMountProvider$LinuxFuseMountBuilder$LinuxFuseMountedVolume.close(LinuxFuseMountProvider.java:167)
at org.cryptomator.cli@0.6.1/org.cryptomator.cli.Unlock.teardown(Unlock.java:97)
at org.cryptomator.cli@0.6.1/org.cryptomator.cli.Unlock.lambda$call$0(Unlock.java:88)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: Cannot run program "fusermount3" (in directory "/test"): error=13, Permission denied
at java.base/java.lang.ProcessBuilder.start(Unknown Source)
at java.base/java.lang.ProcessBuilder.start(Unknown Source)
at org.cryptomator.frontend.fuse@5.0.2/org.cryptomator.frontend.fuse.mount.LinuxFuseMountProvider$LinuxFuseMountBuilder$LinuxFuseMountedVolume.unmount(LinuxFuseMountProvider.java:145)
... 4 common frames omitted
Caused by: java.io.IOException: error=13, Permission denied
at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
at java.base/java.lang.ProcessImpl.(Unknown Source)
at java.base/java.lang.ProcessImpl.start(Unknown Source)
... 7 common frames omitted
```

### Anything else?

I tried to do manual cleanup as described in https://github.com/cryptomator/cli?tab=readme-ov-file#manual-cleanup :
`fusermount -u /test/cryptomator`

But this just says:
```
fusermount: failed to unmount /test/cryptomator: Invalid argument
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.