rsync change destination permissions

Red Squirrel

No Lifer
May 24, 2003
67,385
12,131
126
www.anyf.ca
How do I go about choosing the permission of files on the fly in rsync?

So that when a backup is done, all the files are chmodded say, 700. There is a --chmod flag but it does not use the standard syntax and is not really documented.

The dirty way is to just have a script run chmod -R 700 but I'm wondering if there's a way within rsync to do it.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
The chmod options looks pretty documented to me and it even says the syntax is the same as the chmod command.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
GNU chmod also accepts named options like ugo=rwx for 666. The ugo part just means user,group,other.