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

FileSystem is read-only on macOS 10.15 Catalina beta #955

Closed
overheadhunter opened this issue Aug 18, 2019 · 7 comments
Closed

FileSystem is read-only on macOS 10.15 Catalina beta #955

overheadhunter opened this issue Aug 18, 2019 · 7 comments
Labels
os:mac state:confirmed We are able to reproduce the reported behavior state:has-workaround There is a known workaround for the described problem type:bug Something isn't working
Milestone

Comments

@overheadhunter
Copy link
Member

overheadhunter commented Aug 18, 2019

As reported by @timbru31 in issue #696 (comment), there are currently I/O exceptions caused by ReadOnlyFlag.assertWritable even if the user claims not to have checked read-only mode.

I.e. there is probably a bug on Catalina that causes the underlying filesystem to falsely report read-only permissions.

Related stack trace:

15:12:48.017 [Thread-349] ERROR o.c.frontend.fuse.ReadOnlyAdapter - open failed.
java.nio.file.ReadOnlyFileSystemException: null
	at org.cryptomator.cryptofs.ReadonlyFlag.assertWritable(ReadonlyFlag.java:44)
	at org.cryptomator.cryptofs.LongFileNameProvider$DeflatedFileName.persist(LongFileNameProvider.java:113)
	at java.base/java.util.Optional.ifPresent(Optional.java:183)
	at org.cryptomator.cryptofs.CryptoFileSystemImpl.newFileChannel(CryptoFileSystemImpl.java:359)
	at org.cryptomator.cryptofs.CryptoFileSystemImpl.newFileChannel(CryptoFileSystemImpl.java:346)
	at org.cryptomator.cryptofs.CryptoFileSystemProvider.newFileChannel(CryptoFileSystemProvider.java:302)
	at java.base/java.nio.channels.FileChannel.open(FileChannel.java:292)
	at org.cryptomator.frontend.fuse.OpenFile.<init>(OpenFile.java:27)
	at org.cryptomator.frontend.fuse.OpenFileFactory.open(OpenFileFactory.java:53)
	at org.cryptomator.frontend.fuse.ReadWriteFileHandler.open(ReadWriteFileHandler.java:77)
	at org.cryptomator.frontend.fuse.ReadOnlyFileHandler.open(ReadOnlyFileHandler.java:41)
	at org.cryptomator.frontend.fuse.ReadOnlyAdapter.open(ReadOnlyAdapter.java:199)
	at ru.serce.jnrfuse.AbstractFuseFS.lambda$init$2(AbstractFuseFS.java:132)
	at jnr.ffi.provider.jffi.NativeClosureProxy$$impl$$10.invoke(Unknown Source)
@timbru31
Copy link

Vault storage location: ~/Nextcloud/Vault - obviously the whole Nextcloud folder is synced.

@overheadhunter
Copy link
Member Author

Can you please check your log for warnings saying "Vault on readonly filesystem."?

@timbru31
Copy link

timbru31 commented Aug 19, 2019

Yes this log message is displayed in the log!

22:55:50.239 [main] INFO  org.cryptomator.launcher.Cryptomator - Starting Cryptomator 1.4.12 on Mac OS X 10.15 (x86_64)
22:55:50.246 [main] DEBUG org.cryptomator.logging.DebugMode - Debug mode enabled
22:55:50.302 [main] DEBUG org.cryptomator.launcher.IpcFactory - [Client] Reading IPC port from /Users/timbrust/Library/Application Support/Cryptomator/ipcPort.bin
22:55:50.307 [main] DEBUG org.cryptomator.launcher.IpcFactory - [Client] Connecting to port 51208...
22:55:50.651 [main] DEBUG org.cryptomator.launcher.IpcFactory - [Client] Failed to connect.
22:55:50.940 [main] DEBUG org.cryptomator.launcher.IpcFactory - [Server] Wrote IPC port 50223 to /Users/timbrust/Library/Application Support/Cryptomator/ipcPort.bin
22:55:51.008 [main] INFO  o.c.launcher.IpcProtocolImpl - Received launch args: 
22:55:51.014 [main] DEBUG org.cryptomator.launcher.Cryptomator - Did not find running application instance. Launching GUI...
22:55:51.908 [JavaFX Application Thread] INFO  org.cryptomator.launcher.Cryptomator - JavaFX application started.
22:55:52.104 [JavaFX Application Thread] DEBUG org.cryptomator.ui.l10n.Localization - Loaded localization default file: /localization/en.txt
22:55:52.104 [JavaFX Application Thread] DEBUG org.cryptomator.ui.l10n.Localization - Detected language "en" and region "US"
22:55:52.110 [JavaFX Application Thread] TRACE org.cryptomator.ui.l10n.Localization - Attempting to load localization from: /localization/en_US.txt
22:55:52.111 [JavaFX Application Thread] TRACE org.cryptomator.ui.l10n.Localization - Attempting to load localization from: /localization/en.txt
22:55:52.387 [JavaFX Application Thread] INFO  org.cryptomator.jni.JniModule - loaded libMacFunctions.dylib
22:55:58.096 [JavaFX Application Thread] INFO  o.c.ui.controllers.WelcomeController - Current version: 1.4.12, lastest version: 1.4.12
22:57:26.600 [Background Thread 2] WARN  o.cryptomator.cryptofs.ReadonlyFlag - Vault on readonly filesystem.

@timbru31
Copy link

Problem persists on 19A536g (Catalina Public Beta 5 / Beta 6) and Cryptomator v1.4.15

@overheadhunter
Copy link
Member Author

overheadhunter commented Aug 20, 2019

Probably related to the fact that parts of the file system are protected on Catalina.

Instead of asking whether the filesystem is readonly (which will surely check if / is readonly, which it is), we should check if the top level directory of the vault's storage location is readonly.

@overheadhunter
Copy link
Member Author

Ok here is a temporary workaround until we release a new version:

Patch your Cryptomator by right-clicking on Cryptomator.app and "show package contents", then replace Contents/Java/cryptofs-1.8.7.jar with the version I attached to this post.

cryptofs-1.8.7-patched.jar.zip

@overheadhunter overheadhunter added os:mac state:confirmed We are able to reproduce the reported behavior state:has-workaround There is a known workaround for the described problem type:bug Something isn't working labels Aug 20, 2019
@overheadhunter overheadhunter added this to the 1.4.16 milestone Aug 20, 2019
@timbru31
Copy link

Works like a charm, thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
os:mac state:confirmed We are able to reproduce the reported behavior state:has-workaround There is a known workaround for the described problem type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants