[Solved] Libre Office ignores umask

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
Intracrine
Level 1
Level 1
Posts: 5
Joined: Fri Aug 30, 2019 5:03 am

[Solved] Libre Office ignores umask

Post by Intracrine » Fri Aug 30, 2019 5:33 am

Hello,

I have a NFS share that is accessed by multiple 64-Bit Linux Mint 19.1.
To collaborate, all files should be created with the umask of 0002 which is the default, however Libre Office and Gimp are ignoring the umask and create files with a umask of 0022.
I tried the classic ways of setting the umask via .bashrc, /etc/login.defs, /etc/X11/xinit/xinitrc (calling .bashrc) and creating a /etc/profile.d/umask.sh but the files where always created with 644 no matter what value I chose. When I checked, the terminal did respect the changes in umask.
It is interesting, that the file browser (Caja 1.20.2) and the screenshot tool (Mate) are using the correct umask.

How do I enforce the GUI Apps to use a specific umask, or is this a Libre Office issue?
Last edited by Intracrine on Thu Sep 19, 2019 6:26 am, edited 2 times in total.

rene
Level 12
Level 12
Posts: 4305
Joined: Sun Mar 27, 2016 6:58 pm

Re: Libre Office ignores umask

Post by rene » Fri Aug 30, 2019 9:43 am

Do LibreOffice/GIMP create 644 files only when saved to the NFS share or also when saved locally? Or, conversely, does e.g. touch /mnt/the_share/foo also create 644 on the share?

Because I cannot reproduce on 19.2; both LibreOffice and touch create 664 as expected when saved local, and both "also do the same" on an NFSv3 share here. Formulated that way since said "same" is in fact creating 644 -- but I have configured the NAS on which that NFS share lives that way. I.e., if LibreOffice creates 664 locally as expected, ogle your NFS share setup.

There are various bug-reports out there, i.e.

https://bugs.launchpad.net/ubuntu/+sour ... ug/1685754
https://bugs.launchpad.net/ubuntu/+sour ... ug/1779736

but I can as said not reproduce an issue here; haven't tested NFSv4.

Intracrine
Level 1
Level 1
Posts: 5
Joined: Fri Aug 30, 2019 5:03 am

Re: Libre Office ignores umask

Post by Intracrine » Fri Aug 30, 2019 10:21 am

Hey,

Thanks for your reply.
I had the problem even locally.
The fact, that you could not reproduce the problem is strange and gives hope at the same time. I will test it with a fresh mint 19.1 and 19.2 install at the weekend and report back afterwards.

Intracrine
Level 1
Level 1
Posts: 5
Joined: Fri Aug 30, 2019 5:03 am

Re: Libre Office ignores umask

Post by Intracrine » Sun Sep 01, 2019 10:08 am

Hope fades again, as I have no problem of reproducing the issue. Using the live version downloaded at https://linuxmint.com/download.php (Mate) I could see this problem on PCs ranging from notebooks to gaming PCs.
Steps to reproduce:
1) Have a Live-Stick or DVD with Mint 19.2
2) Boot it
3) Start Libre Office from the Mate Menu
4) Klick the button (Create) Writer Document
5) Type some garbage, hit strg+s and save
6) Open the Terminal and write the following commands:

Code: Select all

$ cd Documents
$ touch test
$ ls -al
Now test has the rights 775 while "Untitled 1" has 755

If this is a bug, has anyone a good workaround for my problem?
The only thing I came up with, is having a cronjob repairing the rights. This is obviously not optimal, since the drive in question contains of millions of files and when a new file is created, it needs to be accessed by others within minutes.

altair4
Level 19
Level 19
Posts: 9738
Joined: Tue Feb 03, 2009 10:27 am

Re: Libre Office ignores umask

Post by altair4 » Sun Sep 01, 2019 11:43 am

It depends on what desktop environment you are using.

On XFCE it looks like what rene posted:
tester@vmint192xfce:~$ cd Documents
tester@vmint192xfce:~/Documents$ touch test
tester@vmint192xfce:~/Documents$ ls -al
total 16
drwxr-xr-x 2 tester tester 4096 Sep 1 11:32 .
drwxr-xr-x 15 tester tester 4096 Sep 1 11:31 ..
-rw-rw-r-- 1 tester tester 0 Sep 1 11:32 test
-rw-rw-r-- 1 tester tester 8136 Sep 1 11:32 'Untitled 1.odt'
Everything is 664.

Do the same thing in MATE:
tester@vmint192mate:~$ cd Documents
tester@vmint192mate:~/Documents$ touch test
tester@vmint192mate:~/Documents$ ls -al
total 20
drwxr-xr-x 2 tester tester 4096 Sep 1 11:38 .
drwxr-xr-x 19 tester tester 4096 Sep 1 11:37 ..
-rw-rw-r-- 1 tester tester 0 Sep 1 11:38 test
-rw-r--r-- 1 tester tester 8219 Sep 1 11:37 'Untitled 1.odt'
touch works - Writer does not.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

rene
Level 12
Level 12
Posts: 4305
Joined: Sun Mar 27, 2016 6:58 pm

Re: Libre Office ignores umask

Post by rene » Sun Sep 01, 2019 12:20 pm

Thank you very much for testing that; was just about to try. Note; the difference is most likely due to different MATE session startup behaviour. I do suppose the Mint MATE edition also uses LightDM? I personally feel MATE the worst offender w.r.t. clouding cross-edition issues and rather explicitly have it not installed, but I bet that's the area you'd need to look into...

Intracrine
Level 1
Level 1
Posts: 5
Joined: Fri Aug 30, 2019 5:03 am

Re: [Solved] Libre Office ignores umask

Post by Intracrine » Thu Sep 19, 2019 6:31 am

Hey,

I applied the workaround of installing Cinnamon next to Mate and so far everything seems to function as expected. Therefore I Marked this as [Solved].
Thank you for your advice. :)

As the original problem looks like a bug to me - should I write a bug report somewhere?

rene
Level 12
Level 12
Posts: 4305
Joined: Sun Mar 27, 2016 6:58 pm

Re: [Solved] Libre Office ignores umask

Post by rene » Thu Sep 19, 2019 7:49 am

It is certainly at the very least inconsistent over the editions. I'd as said suspect the MATE edition's session startup and this would likely mean that although MATE-specific, the issue's still a Mint one. https://github.com/linuxmint/mate says "please report bugs either to MATE or Linux Mint directly", helpfully as ever not in fact specifying/linking what "Linux Mint directly" here entails. Those insistent might supposedly try https://github.com/linuxmint/linuxmint/issues.

Intracrine
Level 1
Level 1
Posts: 5
Joined: Fri Aug 30, 2019 5:03 am

Re: [Solved] Libre Office ignores umask

Post by Intracrine » Thu Sep 19, 2019 8:25 am

Okay, I created an issue on the Github page of Linux Mint.
See Issue 152.

rene
Level 12
Level 12
Posts: 4305
Joined: Sun Mar 27, 2016 6:58 pm

Re: [Solved] Libre Office ignores umask

Post by rene » Thu Sep 19, 2019 8:36 am

Thank you; bookmarked.

rene
Level 12
Level 12
Posts: 4305
Joined: Sun Mar 27, 2016 6:58 pm

Re: [Solved] Libre Office ignores umask

Post by rene » Fri Oct 18, 2019 9:30 am

... but that report remaining in "new" state with 0 comments for a month is the reason I don't bother myself anymore with open-source bugzilla's.

Post Reply

Return to “Software & Applications”