Comment 6 for bug 792145

Revision history for this message
In , Vladimir (vladimir-redhat-bugs) wrote :

Description of problem:
When saving an image, eog does not retain the original permissions and ownership.

Version-Release number of selected component (if applicable):
eog-2.24.3.1-1.fc10.i386

How reproducible:
Do a modification to an image in eog and save it.

Steps to Reproduce:
1. Open image in eog
2. Rotate the image
3. Save the image (File->Save)

Actual results:
The original permissions are gone.

Expected results:
The permissions should be retained.

Additional info:

This is painful for multi-user system or file server because it blocks other users from accessing the file.

In my case the original file attributes looked like this:

rw-rw-r--+ 1 myuser mygroup

After eog saved the image (in place) the attributes changed to:

rw-rw-r--+ 1 myuser myuser

My umask (when run in terminal) is 0002.

It seems this is caused by the way how eog performs the modification and save; strace output releals the following:

[pid 8643] lstat64("/tmp/eog-save-F87BWU", {st_mode=S_IFREG|0600, st_size=42043
7, ...}) = 0
[pid 8643] lstat64("/var/tmp/bio.jpg", {st_mode=S_IFREG|0664, st_size=409310, .
..}) = 0
[pid 8643] rename("/tmp/eog-save-F87BWU", "/var/tmp/bio.jpg" <unfinished ...>
[pid 8638] <... poll resumed> ) = 1 ([{fd=15, revents=POLLIN}])