After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 689319 - "Save Copy As" with file opened from Firefox results in restrictive permissions
"Save Copy As" with file opened from Firefox results in restrictive permissions
Status: RESOLVED NOTGNOME
Product: evince
Classification: Core
Component: general
3.6.x
Other Linux
: Normal enhancement
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-11-30 01:29 UTC by Joshua Lock
Modified: 2012-11-30 23:51 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Joshua Lock 2012-11-30 01:29:04 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.
Comment 1 Christian Persch 2012-11-30 22:08:02 UTC
Not reproducible here; "Save A copy" on a 0400 file produces a 0664 file (with umask 0002).
Comment 2 Joshua Lock 2012-11-30 22:45:05 UTC
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...
Comment 3 Germán Poo-Caamaño 2012-11-30 23:23:05 UTC
(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?
Comment 4 Joshua Lock 2012-11-30 23:33:26 UTC
I was using Ubuntu 12.10 when I discovered this issue. I've filed a ticker in their tracker, too.
Comment 5 Joshua Lock 2012-11-30 23:51:43 UTC
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