How to set different permissions on target

Kevin Korb kmk at sanitarium.net
Sat Dec 21 12:18:07 MST 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The current version of rsync does have a --chown option.  If you don't
have the current version then the solution is simply to run rsync as
that user and it will have no choice but to use that ownership.

On 12/21/2013 01:42 PM, Charles Marcus wrote:
> Hi all,
> 
> Ok, I'm attempting to rsync a large datastore (email), and want to 
> change the ownership of the target directories and files.
> 
> I saw the --chmod option in man rsync, but didn't see a --chown
> option...
> 
> What I'd like to do is something like:
> 
> rsync -avHP --chown vmail:vmail /mnt/old-mail/ /var/vmail/mail/
> 
> So the ownership of all dirs and file on the target are
> vmail:vmail after the rsync is done (on the source they are
> postfix:postfix).
> 
> Can this be done? This is about 350GB of stuff, so I'd rather not
> have to do a separate chown after the rsyn each time (I'll be doing
> this multiple times).
> 
> Thanks,
> 
> Charles
> 

- -- 
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
	Kevin Korb			Phone:    (407) 252-6853
	Systems Administrator		Internet:
	FutureQuest, Inc.		Kevin at FutureQuest.net  (work)
	Orlando, Florida		kmk at sanitarium.net (personal)
	Web page:			http://www.sanitarium.net/
	PGP public key available on web site.
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlK16W8ACgkQVKC1jlbQAQdjRACfTRzYOSV5SLaaEme56GgUkbZn
nL4AoJl4bx4gLXqOhMPMFxF0M0NgVzA8
=J5YP
-----END PGP SIGNATURE-----


More information about the rsync mailing list