Shared spreadsheet linux permisions

HI,
I want to use a LibreOffice Calc on terminal serwer (Ubuntu+ThinLinc), with shared ODS spreadsheets for multiple users, but…
When the first time I want to set my spreadsheet to shared mode and save file on my local drive, it’s creating a sharing_info temporary file .~sharin-myfilename.ods# with default 644 (-rw-r–r–) permision. If anothere user is connecting to terminal server and trying to open spreadsheet he cannot do it in shared mode (because lack of save permision to temporary file).
Of course if I change manually permisions to 666, everything is ok, and shared mode works well.
How to force creating that file with proper permisions??

Hello,

How to force creating that file with proper permisions??

This is a matter of the umask (which is probably set to 0022 for the user creating the file). You need to adapt the umask - LibreOffice doesn’t take care how permissions on files are set (afaik). Please note: umask can be set on a process level, so there is no need to change change that globally (for a user and all its processes). E.g. creating a LibreOffce start script like (very simplified version):

#!/bin/bash
umask 0002
libreoffice7.1

should assure that files being created from child process libreoffice7.1 of bash process, will have permissions 664 (-rw-rw-r--)

Note(s)

  • I strongly recommend to not use umask 0000 (-rw-rw-rw-) but to assure permission to write to files by membership of eligible users in a special group, which could be called loedit, lowrite or the like …
  • I strongly recommend to not use umask 0002 on a system level
  • I recommend to not use umask 0002 on a user level

Hope that helps

It works like a charm, thank you