DO NOT REPLY [Bug 5147] Read-only files that have changed xattrs fail to allow xattr changes

samba-bugs at samba-bugs at
Wed Nov 18 06:02:05 MST 2009 at changed:

           What    |Removed                     |Added
                 CC|                            |
                   |                            |

------- Comment #2 from at  2009-11-18 07:02 CST -------
The --fake-super work-around doesn't seem to work either.

A temporary file is created on the target with read-only permissions in
open_tmpfile() (reciever.c). That prevents the faked super user to change
attributes even though she owns the temporary file.

Temporary files should be created with mode 0600 (the same as when creating the
file "inplace"). Correct attributes and modes (in that order) are set later in
finish_transfer(), as the comment in open_tmpfile() before do_mkstemp() says
already. Mode 0600 should also be used in the call to robust_rename() from

Note that this will not fix a similar problem when read-only files are modified
in place or when files in a read-only directory are created (either because
they were created in the source, or they were modified and temporary files are
created). A correct solution here should perhaps involve resetting the mode to
0600 before modification and setting it back to either the original mode or to
the mode of the source file/directory afterwards. I have no idea how difficult
that may turn out, though.

Configure bugmail:
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.

More information about the rsync mailing list