owner and group

Tony Abernethy tony at servacorp.com
Thu Feb 8 12:19:36 GMT 2007

-a gets several options you probably want  (in particular -o and -g)
(from man rsync)
        -a, --archive               archive mode, equivalent to -rlptgoD

        -r, --recursive             recurse into directories
        -l, --links                 copy symlinks as symlinks
        -p, --perms                 preserve permissions
        -o, --owner                 preserve owner (root only)
        -g, --group                 preserve group
        -D, --devices               preserve devices (root only)
        -t, --times                 preserve times

> -----Original Message-----
> From: rsync-bounces+tony=servacorp.com at lists.samba.org
> [mailto:rsync-bounces+tony=servacorp.com at lists.samba.org]On Behalf Of
> Hans Mignon
> Sent: Thursday, February 08, 2007 3:11 AM
> To: rsync at lists.samba.org
> Subject: owner and group
> Hello,
> I am trying to copy, on the same server, a set of files. I need to
> copy them every day with a cron job.
> This is working fine the only problem is that he always changes the
> owner and group to the root user.
> Is there a possibility that he uses the user of the remote files and
> not the root user ?
> rsync --archive --exclude ".htaccess" /home/virtual/site5/fst/var/www/
> html/ /home/virtual/site10/fst/var/www/html/aaa/
> Thanks,
> Hans Mignon
> --
> View this message in context:
Sent from the Samba - rsync mailing list archive at Nabble.com.

To unsubscribe or change options:
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

More information about the rsync mailing list