Graceful unmount failed when sending SIGTERM signal (fusermount3 permission denied)
- Lingua principale
- Java
- Stelle
- 428
- Fork
- 52
- Merge medio
- 20h 37m
- PR unite (30g)
- 2
Descrizione
### 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
```
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia riproducendo il teardown di SIGTERM su Ubuntu con il comando di mount FUSE dell’issue. Leggi Unlock.teardown in Unlock.java:97 e le chiamate unmount/close di LinuxFuseMountProvider alle righe 145-167, quindi confrontale con la pulizia manuale documentata nel README. Il lavoro è completato quando l’unmount aggraziato non segnala più l’errore di autorizzazione e il comportamento di pulizia documentato rimane accurato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java, linux
- Ambito
- cli, operating-systems
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 38/100