When trying to save a new Writer document to a mounted CIFS share I get the following error: Error saving the document Untitled1: Access to /tmp/lu6247vp88ys.tmp/lu6247vp88yx.tmp was denied. Error saving the document test: Object not accessible. The object cannot be accessed due to insufficient user rights. [user@desk1 ~]$ ls /tmp/lu6247vp88ys.tmp/ -lah total 0 drwx------. 2 user user 80 Aug 15 10:08 . drwxrwxrwt. 20 root root 500 Aug 15 10:10 .. -rw-------. 1 user user 0 Aug 15 10:08 lu6247vp88yt.tmp ----rw----. 1 user user 0 Aug 15 10:08 lu6247vp88yx.tmp Mount: [user@desk1 ~]$ mount | grep yht systemd-1 on /mnt/yhteinen type autofs (rw,relatime,fd=36,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=13493) //files.intra.company.fi/yhteinen on /mnt/yhteinen type cifs (rw,relatime,vers=1.0,cache=strict,username=kaikki,domain=FILES,uid=0,noforceuid,gid=951000012,forcegid,addr=10.0.0.203,file_mode=060,dir_mode=070,nounix,serverino,mapposix,rsize=61440,wsize=65536,echo_interval=60,actimeo=1) version/OS: libreoffice-core-5.1.5.2-1.fc24.x86_64 on Fedora 24
Can any other program save to a similar file? E.g simple text file with kate or gedit.
Yes, the share can be read/written to by other programs. Actually it seems that even LibreOffice can atleast create a file. I can create a file /mnt/share/test/test.txt using gedit. If I try to save /mnt/share/test/test.odt using Writer it gives the error but the file still gets created. It's also not possible to open the file (/tmp/... access was denied) but copying it to a local location and then opening it works fine.
I found out that it has to do with the permissions of the file. The files in question are shared by the office, permissions 060 with a common group. # ls /mnt/yhteinen/test.odt -lah ----rw----. 1 root office 8.7K Aug 15 10:08 /mnt/yhteinen/test.odt Possibly libreoffice tries to copy the file or atleast the mode/permissions which ends in a temp file like this: ----rw----. 1 user user 0 Aug 15 10:08 lu6247vp88yx.tmp Since now the effective permission is the user instead of the group it no longer has access. After changing to file_mode=660 in mount options it works.
(In reply to Esa Varemo from comment #3) > After changing to file_mode=660 in mount options it works. Ok, setting to NOTABUG (checked on dev IRC to be sure as I'm not a shared mount expert).