GNOME Bugzilla – Bug 753019
Evince saves copy with wrong permissions (not honoring umask)
Last modified: 2015-09-02 13:33:27 UTC
Apparently the "Save a Copy..." function of Evince is saving the copied file under the same permissions that the original file was opened with. Evince does *not* honor the user file-creation mask (umask) at all and is unaware of this concept. #749580 is essentially referring to the same issue. There is also a similar bug over at the Ubuntu bugtracker [1]. This problem with the current behavior leads to issues: For instance, Mozilla recently [2] changed the file permission for temporary files to 0400 respectively. When using the "Open in Evince" option within Firefox, and then saving a copy with Evince the file will be end up with 0400. This is a problem when making use of Unix file and group permissions, since no group member will be able to access the file. Evince, like other applications, should instead honor the umask set by the user, which would allow a more fine grained control. [1]: https://bugs.launchpad.net/ubuntu/+source/evince/+bug/1082297 [2]: https://bugzilla.mozilla.org/show_bug.cgi?id=1074793
Just as a reference: evince version: [kbabioch@kbabioch ~]$ rpm -q evince evince-3.8.3-8.el7.x86_64 Distribution: [kbabioch@kbabioch ~]$ cat /etc/redhat-release Red Hat Enterprise Linux Workstation release 7.1 (Maipo) evince version 3.16.1-1 behaves in the same way, though, so I guess version numbers are not too important in this case.
Another point of reference: [kbabioch@kbabioch ~]$ rpm -q gnome-shell gnome-shell-3.8.4-45.el7.x86_64
Created attachment 309612 [details] [review] Don't copy permissions from original file Evince uses permissions of original file for the new copy since 3.5.2 because of these commits: https://git.gnome.org/browse/evince/commit/?id=fd2b09adf5171df9351832a663e122cb4caab427 https://git.gnome.org/browse/evince/commit/?id=8652c61ea91698f7d3a5e11a467eca3b0ec4ac26 This was considered a bug previously: https://bugzilla.gnome.org/show_bug.cgi?id=568593 https://bugzilla.gnome.org/show_bug.cgi?id=689319 Attached patch fixes the problem for me.
Do we have any news on this Bug? Is the Patch accepted?
Review of attachment 309612 [details] [review]: Ok, thanks!
Comment on attachment 309612 [details] [review] Don't copy permissions from original file Thank you for the review. I've pushed the patch to master and 3.16 branches.
Any chance this will also make its way into older branches? We encountered this problem with RHEL 7.1, so we would like to have this patch available in the 3.8 branch ;).
(In reply to Karol Babioch from comment #7) > Any chance this will also make its way into older branches? We encountered > this problem with RHEL 7.1, so we would like to have this patch available in > the 3.8 branch ;). I think that this has to go through a downstream bug.