overwrite read-only file with inplace option

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

overwrite read-only file with inplace option

Samba - rsync mailing list
rsync is unable to overwrite read-only destination files with the
--inplace option. I think this is expected behavior but not convenient
for our case. I wrote a small patch that in case of an permission denied
error, adds the owner write bit to the permissions and tries to open the
destination file again for write again.

It's not very elegant but it solved our problem. I attached the patch in
case it's useful for someone.


Institute of Astronomy
Universtity of Leuven

Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

change-permission-for-inplace-write.patch (649 bytes) Download Attachment