cannot rsync when source directory lacks write permission

András Porjesz andras.porjesz at ericsson.com
Wed Aug 8 00:29:34 MDT 2012


Hi Steven,
In my case rsyncd runs as root, so it must have right to do the job. Rsync started with -p, but the daemon could not write into the destination area, because the [newly created] directories were owned by "nobody" and "other" had no right to write into it. The solution (workaround) was to add this line to the config of the daemon: uid=root. I have no any idea why it works, why it has any effect at all and why it was not documented if it was required to use --perms.

Andras

-----Original Message-----
From: rsync-bounces at lists.samba.org [mailto:rsync-bounces at lists.samba.org] On Behalf Of Steven Levine
Sent: Wednesday, August 08, 2012 00:16
To: rsync at lists.samba.org
Subject: Re: cannot rsync when source directory lacks write permission

In <CAFUyVX4O-o=r36MA0sMfhMMiPZSurLg3V0Z=QX_v1Bz099ggHw at mail.gmail.com>,
on 08/07/12
   at 01:03 PM, "Greg Deback (rsync)" <greg.deb+rsync at gmail.com> said:


Hi,


>No I think this bug is not related. However, I am wondering : if the 
>directory is write-protected, even for root, that means it never 
>changes right ?

No.  As the code says

/* We need to ensure that the dirs in the transfer have both
 * readable and writable permissions during the time we are
 * putting files within them.  This is then restored to the
 * former permissions after the transfer is done. */

If András can not create files and/or dirctories at the destination, it is because the directory does not already have the required read/write permissions or the rsync daemon does not have the authority to change the permissions.

Regards,

Steven

--
----------------------------------------------------------------------
"Steven Levine" <steve53 at earthlink.net>  eCS/Warp/DIY etc.
www.scoug.com www.ecomstation.com
----------------------------------------------------------------------

--
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


More information about the rsync mailing list