Cant write to vault located on CIFS-share

No matter if i use webdav or fuse, I cant write even the smallest file to a vault thats being mounted by Nemo in GVFS. This actually used to work.

I get “Input/output error” while writing a file, it shows up as zero-length.

I get the following exception in ryptomator while trying to write a file

18:34:52.918 [Thread-100] ERROR o.c.f.fuse.ReadWriteFileHandler - Flushing file failed.
java.io.IOException: Exceptions occured while writing
	at org.cryptomator.cryptofs.fh.ExceptionsDuringWrite.throwIfPresent(ExceptionsDuringWrite.java:29)
	at org.cryptomator.cryptofs.ch.CleartextFileChannel.forceInternal(CleartextFileChannel.java:214)
	at org.cryptomator.cryptofs.ch.CleartextFileChannel.force(CleartextFileChannel.java:207)
	at org.cryptomator.frontend.fuse.OpenFile.flush(OpenFile.java:102)
	at org.cryptomator.frontend.fuse.ReadWriteFileHandler.flush(ReadWriteFileHandler.java:103)
	at org.cryptomator.frontend.fuse.ReadWriteAdapter.flush(ReadWriteAdapter.java:288)
	at ru.serce.jnrfuse.AbstractFuseFS.lambda$init$6(AbstractFuseFS.java:144)
	at jnr.ffi.provider.jffi.NativeClosureProxy$$impl$$14.invoke(Unknown Source)
	Suppressed: java.io.IOException: Operation not supported
		at java.base/sun.nio.ch.FileDispatcherImpl.pwrite0(Native Method)
		at java.base/sun.nio.ch.FileDispatcherImpl.pwrite(FileDispatcherImpl.java:68)
		at java.base/sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:109)
		at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:79)
		at java.base/sun.nio.ch.FileChannelImpl.writeInternal(FileChannelImpl.java:850)
		at java.base/sun.nio.ch.FileChannelImpl.write(FileChannelImpl.java:836)
		at org.cryptomator.cryptofs.fh.ChunkIO.write(ChunkIO.java:51)
		at org.cryptomator.cryptofs.fh.ChunkSaver.save(ChunkSaver.java:35)
		at org.cryptomator.cryptofs.fh.ChunkCache.removeChunk(ChunkCache.java:48)
		at com.google.common.cache.LocalCache.processPendingNotifications(LocalCache.java:1810)
		at com.google.common.cache.LocalCache$Segment.runUnlockedCleanup(LocalCache.java:3463)
		at com.google.common.cache.LocalCache$Segment.postWriteCleanup(LocalCache.java:3439)
		at com.google.common.cache.LocalCache$Segment.clear(LocalCache.java:3216)
		at com.google.common.cache.LocalCache.clear(LocalCache.java:4272)
		at com.google.common.cache.LocalCache$LocalManualCache.invalidateAll(LocalCache.java:4911)
		at org.cryptomator.cryptofs.fh.ChunkCache.invalidateAll(ChunkCache.java:79)
		at org.cryptomator.cryptofs.ch.CleartextFileChannel.forceInternal(CleartextFileChannel.java:213)
		... 6 common frames omitted

Version 1.4.15
Linux Min 19.2

We recently released a hotfix for macOS but your stack trace actually looks quite similar. This may have been fixed in Cryptomator 1.4.17. Could you please test this version?

There is no Linux binary yet. Download “buildkit-linux.zip” here and execute the “launcher-linux.sh”: https://github.com/cryptomator/cryptomator/releases/tag/1.4.17

Edit: JRE 11 is at least required.

That’s where I ended up when I googled, but never tried shellscript in 1.4.17 for macOS. Will do tomorrow at work.

Well, on macOS you could just download the Cryptomator 1.4.7 binary directly. What I meant is, if you could test this again on Linux. But since we don’t have a binary for that yet, you have to test it via the aforementioned way.

I’ve also had issues with writing to Nemo/GVFS mounts on Mint. The solution for me was to make a standard mountpoint to a share, either through fstab or the mount command. davfs and cifs both seem to work fine. With SMB/CIFS it seems to help to declare the correct UID and GID values.

example command line for CIFS

sudo mount -t cifs -o rw,username=USER,password=PASSWORD,uid=$(id -u),gid=$(id -g) //SERVER/SHARE ~/CRYPTO/

example fstab line for WEBDAV
https://webdavserver/dav/ ~/CRYPTO davfs user,rw,noauto 0 0

1 Like

I ditched Mint for Ubuntu 19.10, tried buildkit of 1.4.17 for linux, same issue but different error
(i tried to copy the file launcher-linux.sh to a vault)

19:21:21.925 [Thread-259] ERROR o.c.frontend.fuse.ReadWriteAdapter - chmod /launcher-linux.sh failed.
java.nio.file.FileSystemException: /run/user/1000/gvfs/smb-share:server=<server>,share=docs/vaults/vault/d/EP/R63MNWEBFHXPXB7AVAGFU7FBNXH573/B5ESH3EBZUY4RJHAG27RVENP2P2YXHKEI4IGNXUERLTHY2B4AP6QY===: Operation not supported
	at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:100)
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
	at java.base/sun.nio.fs.UnixFileAttributeViews$Posix.setMode(UnixFileAttributeViews.java:254)
	at java.base/sun.nio.fs.UnixFileAttributeViews$Posix.setPermissions(UnixFileAttributeViews.java:276)
	at org.cryptomator.cryptofs.attr.CryptoPosixFileAttributeView.setPermissions(CryptoPosixFileAttributeView.java:59)
	at java.base/java.nio.file.Files.setPosixFilePermissions(Files.java:2079)
	at org.cryptomator.frontend.fuse.ReadWriteAdapter.chmod(ReadWriteAdapter.java:126)
	at jnr.ffi.provider.jffi.NativeClosureProxy$$impl$$7.invoke(Unknown Source)