Bug 398450

Summary: okular saves as with too few permissions
Product: [Applications] okular Reporter: Simon Oosthoek <kdebugs>
Component: generalAssignee: Okular developers <okular-devel>
Status: RESOLVED DUPLICATE    
Severity: major CC: nate, t.piekarski
Priority: NOR    
Version: 1.3.3   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:

Description Simon Oosthoek 2018-09-10 07:17:40 UTC
Okular doesn't save with the maximum permissions allowable by the umask, which causes problems when sharing files over a unix network share (NFS) and scp.

e.g. when the umask (-S) is set to: u=rwx,g=rwx,o=rx, a file saved with "save as" will get the permissions -rw-------.
The expected permssions are: -rw-rw-r--

I expect okular to request -rw-rw-rw- permissions from the OS, and being allowed to set -rw-rw-r-- according to the umask.

Example; when e.g. a student writes a copy of a deliverable document to a supervisor to a network drive (or locally, and later copied using scp) using save as, the file ends up with too few permissions to be readable by the supervisor. This is unexpected behaviour and can result in delays for the student, or worse...

I hope this is already fixed in later versions of okular, however the version included in ubuntu 18.04 has this problem.
Comment 1 Thomas Piekarski 2018-09-10 16:32:28 UTC
Hello,

this problem with umask is already fixed, please see the issue at phabricator: https://phabricator.kde.org/D12049 - with a very literal title ;)

It was merged at April 23rd and should be available with Okular 1.5 (though its not mentioned in the release log: https://www.kde.org/announcements/fulllog_applications.php?version=18.08.0#okular, so I checked out the latest commit from master and I can not reproduce. The file permissions are set according to the umask.).
Comment 2 Simon Oosthoek 2018-09-10 16:36:55 UTC
Thanks, that confirms this is a bug in the versions up to 1.5. I hope it can be backported to a bugfix in ubuntu stable... I'll see if I can make a bugreport on launchpad for it.

I'm wondering when this bug was introduced to okular...

Cheers

/Simon
Comment 3 Christoph Feck 2018-09-10 23:33:09 UTC
It was committed to 18.04 branch, so it won't show up in 18.08 release changelog. Deducing from date, it should be fixed since KDE Applications 18.04.1 which comes with Okular 1.4.1.

*** This bug has been marked as a duplicate of bug 392682 ***
Comment 4 Thomas Piekarski 2018-09-11 05:18:48 UTC
(In reply to Christoph Feck from comment #3)
> It was committed to 18.04 branch, so it won't show up in 18.08 release
> changelog. Deducing from date, it should be fixed since KDE Applications
> 18.04.1 which comes with Okular 1.4.1.

Thanks for clarifying in which version this bug was fixed - with version 1.4.1 it looks more promising for backporting :)