Exception in thread "main" org.cryptomator.cryptolib.api.InvalidPassphraseException
elliotks opened this issue · 7 comments
Hi,
I reviewed another case from someone with a similar issue, vault name, password and hostname changed for reporting issue. I would like to use cryptomator, so if anyone can provide details on how to use cryptomator on headless CentOS 7 server - I would appreciate it. Sorry for any unprofessional formatting of the issue ahead of time.
I'am using google-drive-ocamlfuse to mount my google drive /home/plex/mnt/drive/MySecretVault
UnlimitedJCEPolicyJDK8
http://download.oracle.com/otn-pub/java/jce/8/jce_policy-8.zip
BASH
[user@hostname ~]$ sudo update-alternatives --config java
There is 1 program that provides 'java'.
Selection Command
*+ 1 java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.161-0.b14.el7_4.x86_64/jre/bin/java)
END BASH
copied US_export_policy.jar & local_policy.jar to both directories
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.161-0.b14.el7_4.x86_64/jre/lib/security/
/usr/lib/jvm/jre-1.8.0/lib/security/
BASH
[plex@hostname ~]$ java -jar cryptomator-cli-0.3.1.jar --bind 0.0.0.0 --port 42427 --vault MySecretVault=/home/plex/mnt/drive/MySecretVault/ --password MySecretVault=PASSWORD 09:43:00.519 [main] INFO org.eclipse.jetty.util.log - Logging initialized @1241ms to org.eclipse.jetty.util. log.Slf4jLog
09:43:00.585 [main] INFO o.c.frontend.webdav.WebDavServer - Binding server socket to 0.0.0.0:42427
09:43:00.603 [main] INFO o.e.jetty.server.AbstractConnector - Started ServerConnector@5ec0a365{HTTP/1.1,[htt p/1.1]}{0.0.0.0:42427}
09:43:00.605 [main] INFO org.eclipse.jetty.server.Server - jetty-9.4.z-SNAPSHOT
09:43:00.652 [main] INFO o.e.j.server.handler.ContextHandler - Started o.e.j.s.ServletContextHandler@6325a3e e{/,null,AVAILABLE}
09:43:00.653 [main] INFO org.eclipse.jetty.server.Server - Started @1379ms
09:43:00.653 [main] INFO o.c.frontend.webdav.WebDavServer - WebDavServer started.
09:43:00.653 [main] INFO org.cryptomator.cli.CryptomatorCli - Unlocking vault "MySecretVault" located at /home/plex/mnt/drive/MySecretVault
Exception in thread "main" org.cryptomator.cryptolib.api.InvalidPassphraseException
at org.cryptomator.cryptolib.v1.CryptorProviderImpl.createFromKeyFile(CryptorProviderImpl.java:98)
at org.cryptomator.cryptolib.v1.CryptorProviderImpl.createFromKeyFile(CryptorProviderImpl.java:75)
at org.cryptomator.cryptolib.v1.CryptorProviderImpl.createFromKeyFile(CryptorProviderImpl.java:35)
at org.cryptomator.cryptofs.CryptoFileSystemModule.lambda$provideCryptor$0(CryptoFileSystemModule.jav a:36)
at org.cryptomator.cryptofs.UncheckedThrows$2.from(UncheckedThrows.java:58)
at org.cryptomator.cryptofs.CryptoFileSystemModule.provideCryptor(CryptoFileSystemModule.java:31)
at org.cryptomator.cryptofs.CryptoFileSystemModule_ProvideCryptorFactory.get(CryptoFileSystemModule_P rovideCryptorFactory.java:42)
at org.cryptomator.cryptofs.CryptoFileSystemModule_ProvideCryptorFactory.get(CryptoFileSystemModule_P rovideCryptorFactory.java:11)
at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
at org.cryptomator.cryptofs.CryptoFileSystemImpl_Factory.get(CryptoFileSystemImpl_Factory.java:121)
at org.cryptomator.cryptofs.CryptoFileSystemImpl_Factory.get(CryptoFileSystemImpl_Factory.java:11)
at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
at org.cryptomator.cryptofs.DaggerCryptoFileSystemProviderComponent$CryptoFileSystemComponentImpl.cry ptoFileSystem(DaggerCryptoFileSystemProviderComponent.java:283)
at org.cryptomator.cryptofs.CryptoFileSystems.lambda$null$0(CryptoFileSystems.java:37)
at java.util.concurrent.ConcurrentHashMap.compute(ConcurrentHashMap.java:1853)
at org.cryptomator.cryptofs.CryptoFileSystems.lambda$create$1(CryptoFileSystems.java:30)
at org.cryptomator.cryptofs.UncheckedThrows$1.from(UncheckedThrows.java:38)
at org.cryptomator.cryptofs.CryptoFileSystems.create(CryptoFileSystems.java:30)
at org.cryptomator.cryptofs.CryptoFileSystemProvider.newFileSystem(CryptoFileSystemProvider.java:274)
at org.cryptomator.cryptofs.CryptoFileSystemProvider.newFileSystem(CryptoFileSystemProvider.java:88)
at java.nio.file.FileSystems.newFileSystem(FileSystems.java:326)
at java.nio.file.FileSystems.newFileSystem(FileSystems.java:276)
at org.cryptomator.cryptofs.CryptoFileSystemProvider.newFileSystem(CryptoFileSystemProvider.java:124)
at org.cryptomator.cli.CryptomatorCli.startup(CryptomatorCli.java:72)
at org.cryptomator.cli.CryptomatorCli.main(CryptomatorCli.java:32)
END BASH
from my experience the cli is working properly on headless ubuntu server
re-check your password -> "InvalidPassphraseException"
in the first step I would try the local filesystem to exclude potential problems with google drive mount
Hi @didlich
I setup the vault via Windows 10 with Cryptomator Version 1.3.4 x64
The password is correct as the vault works properly on my Windows 10 Machine.
Installed Packages
java-1.8.0-openjdk.x86_64 1:1.8.0.161-0.b14.el7_4 @updates
java-1.8.0-openjdk-headless.x86_64 1:1.8.0.161-0.b14.el7_4 @updates
javapackages-tools.noarch 3.4.1-11.el7 @base
I have confirmed the mount is functioning and can be written to:
[plex@hostname ~]$ cd mnt/drive/MySecretVault/
[plex@hostname MySecretVault]$ ls
d m masterkey.cryptomator masterkey.cryptomator.bkup
[plex@hostname MySecretVault]$ touch temp.txt
[plex@hostname MySecretVault]$ ls
d m masterkey.cryptomator masterkey.cryptomator.bkup temp.txt
did you try to use a file containing the password? please try this first
Hi @didlich
Same error with password inside secretPW file.
java -jar cryptomator-cli-0.3.1.jar --bind 0.0.0.0 --port 42427 --vault myvault=/home/plex/mnt/drive/myvault/ --passwordfile myvault=secretPW
are you sure the path to the file "secretPW" is correct, I think it should look like myvault=/path/to/secretPW
@didlich
Yes, if the path or file was incorrect it would throw the following error:
TS [main] ERROR org.cryptomator.cli.CryptomatorCli - Cannot read password from file:
Hi @didlich
Thanks again for your suggestions, I had updated the password on the windows 10 machine for the vault. When I tried the old password I received
Exception in thread "main" java.nio.file.AccessDeniedException: /home/plex/mnt/drive/masterkey.cryptomator.bkup
Upon reviewing this, I tested editing with vi and received permission denied. I then updated the permissions to 755 on masterkey.cryptomator*
So I did fusermount -u /home/plex/mnt/drive
and remounted with -cc
I guess for some reason it caches the masterkey.cryptomator files
Thanks