GNOME Bugzilla – Bug 568593
saving a file does not respect umask - wrong permissions
Last modified: 2009-01-22 20:48:38 UTC
evince always saves files with "600" permissions, disregarding both the original file permissions and the user's umask. It should save files respecting the umask (and disregarding original permissions), since it is a new file. Otherwise, it wreaks havoc in an office filesharing environment. You can't share files with your group (or the gid group), even if your umask is set appropriately, without manually using chmod. Which sucks. Tested in 2.24.2. - Mike
Also confirmed in 2.25.5. - Mike
Maybe G_FILE_COPY_TARGET_DEFAULT_PERMS should be set for file copies. I see that is only listed for "unstable" gio: http://library.gnome.org/devel/gio/unstable/GFile.html#GFileCopyFlags - Mike
Created attachment 127014 [details] [review] Use default permissions when saving a file This patch uses the G_FILE_COPY_TARGET_DEFAULT_PERMS (new in glib 2.19.0) so that copied/saved files are created with the default permissions (respecting the user's umask, and the setgid bit on the directory, if set). Please review, I can commit if OK. - Mike
Created attachment 127027 [details] [review] corrected patch changes #ifdef to #if. Oops.
Please commit
Thanks! Committed. - Mike