1

I have an HP Compaq nx9420 that runs Debian 12/bookworm kernel 6.1.0-10-amd64. It's a default install with no extras or tweaks.

I mount a CIFS-drive (fstab-line: "//[ip]/[share] /[mnt]/[point] cifs user,username=[user] 0 0") as a user where I have read/write access. This is tested using simple file operations like cp, mv, touch and edit/save using nano and all this works ok. The CIFS-serving machine runs OpenBSD with Samba 4.4.5. It's been working flawless with a windows 7 client (used with LibreOffice for Windows) for a long time.

Then I want to work with LibreOffice Calc (LOC) files. This works fine as expected when I'm working with files that belong to the local filesystem, but when I try using the CIFS-drive, saving files from LOC fails. Some data get written to the file (the file size increases), but the operation is reported to fail by LOC. The error message is "Error saving the document [file name] General Error. General input/output error.". Trying to open the file I just tried to save yields a "file corrupted" message from LOC and the file cannot be opened.

There are a few instances of getting this error message on the web, where I have tried other peoples fixes, without any change in behaviour:

  • Run apt install libreoffice - actually installed 689 MB of new things, but no effect on my issue
  • Turn off file locking in LOC - also no effect

Any ideas on how to fix this appreciated!

Edit2: Found a solution and wrote that in an answer. I wrote it here first...

2
  • FYI the libreoffice package is a "metapackage [that] installs all components of libreoffice." If you only wanted calc, you can probably remove the ~600MB again.
    – Xen2050
    Commented Dec 26, 2023 at 10:55
  • Maybe try disabling various SMB extensions and try different protocol versions.
    – Daniel B
    Commented Dec 26, 2023 at 17:14

1 Answer 1

1

I run testparm on the SAMBA-host and noticed that /var/samba and /var/cache/samba had insufficient mod (should be 0755 for both, but was less). This in combination with changing the protocol (from CIFS to SMB3) solved the problem!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .