Bug 116117 - No Longer Honoring Umask
Summary: No Longer Honoring Umask
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: framework (show other bugs)
(earliest affected)
Hardware: All All
: high normal
Assignee: Miklos Vajna
Whiteboard: target:6.1.0
Keywords: bibisected, bisected, regression
Depends on:
Blocks: rename-before-copy-regressions
  Show dependency treegraph
Reported: 2018-03-01 15:07 UTC by Dave Richards
Modified: 2019-05-27 04:31 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description Dave Richards 2018-03-01 15:07:02 UTC
LO 6.1 snapshot 2018-02-28 is not honoring Linux umask.  The files are being saved 600, even if umask requests 666.   This will cause serious problems on any multi-user deployments.

Steps to Reproduce:
1.Set umask to 000
2.Create a new document, and save
3.Note file permissions

Actual Results:  
File is saved 600

Expected Results:
File should be saved 666

Reproducible: Always

User Profile Reset: No

Additional Info:
drichard@desktopnxcloud:/home/largo/tmp$ ls -lad kirk*
-rw------- 1 drichard drichard 8254 Mar  1 10:00 kirk.odt

User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0
Comment 1 Aron Budea 2018-03-02 04:57:51 UTC
Reproduced and bibisected using repo bibisect-linux-64-6.1 to the commit referenced below. Adding Cc: to Miklos Vajna, please take a look.

author		Miklos Vajna <vmiklos@collabora.co.uk>	2018-01-08 16:49:25 +0100
committer	Miklos Vajna <vmiklos@collabora.co.uk>	2018-01-09 09:09:27 +0100

sfx2 store: try rename before copying
Comment 2 Aron Budea 2018-03-02 05:00:25 UTC
Note that no actual changing of umask is needed for repro, eg. by default files on my system are saves as 644 (umask is 0022), but after the commit in LO they're saved as 600.
Comment 3 Commit Notification 2018-03-13 08:10:18 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":


tdf#116117 sfx2 store: don't inherit temp file permissions when renaming

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:

Affected users are encouraged to test the fix and report feedback.
Comment 4 Miklos Vajna 2018-03-14 08:06:24 UTC
(No backport, regression was master-only.)
Comment 5 deant 2018-08-27 14:51:21 UTC
this bug is still actual on
Comment 6 Aron Budea 2018-08-27 14:56:05 UTC
(In reply to deant from comment #5)
> this bug is still actual on
Should be bug 119050 instead.
Comment 7 deant 2018-08-27 15:34:31 UTC
Both are actual. Overwriting pdfs (i didnt test that) and overwriting native format still is bugged (i tested that-https://bugs.documentfoundation.org/show_bug.cgi?id=119505)