GNOME Bugzilla – Bug 689319
"Save Copy As" with file opened from Firefox results in restrictive permissions
Last modified: 2012-11-30 23:51:43 UTC
A common usage pattern of mine is to download PDF's through Firefox by clicking the link and selecting "Open with", on occasion I'd like to keep the PDF's so use the File->Save a Copy As menu item in Evince to save a copy in my home directory. The files are copied with the same permissions they have when downloaded by Firefox to tmp (r--------) - this leads to the protected badge icon being displayed over the file in Nautilus and a file which is less accessible (from a privileges perspective) than others created and saved to my home directory (with the default permissions of rw-rw-r--). I think it would be good to remain consistent with the default permissions when effectively creating a new document rather than maintaining the more restrictive permissions of the temporary file.
Not reproducible here; "Save A copy" on a 0400 file produces a 0664 file (with umask 0002).
I just looked through the Evince code and found that ev_xfer_simple() passes G_FILE_COPY_TARGET_DEFAULT_PERMS to g_file_copy(). I guess this is a bug in my distro? Apologies for the noise...
(In reply to comment #2) > I just looked through the Evince code and found that ev_xfer_simple() passes > G_FILE_COPY_TARGET_DEFAULT_PERMS to g_file_copy(). > > I guess this is a bug in my distro? Apologies for the noise... it might be. It works for me as well. What distro are you using?
I was using Ubuntu 12.10 when I discovered this issue. I've filed a ticker in their tracker, too.
Resolving this as NOTGNOME. Again, apologies for the noise. Here's the ticket in Launchpad in case any Ubuntu users come across this issue: https://bugs.launchpad.net/ubuntu/+source/evince/+bug/1084820