Is it possible to set the permissions on the destination side? As I understand it, --chmod just pretends certain permissions are coming from the sending side. I'd like to be able to set permissions to readonly in the destination while coming from a --copy/link-dest which may more may not have had it's permissions changed.
On Fri, 2009-02-06 at 09:32 -0500, Matthew Monaco wrote:> Is it possible to set the permissions on the destination side? As I > understand it, --chmod just pretends certain permissions are coming from > the sending side.If you use --chmod with -p, you'll end up setting the destination permissions.> I'd like to be able to set permissions to readonly in > the destination while coming from a --copy/link-dest which may more may > not have had it's permissions changed.With --chmod and -p, the receiver will locally copy any --link-dest files that have the right data but the wrong permissions. This will give you the permissions you desire in the destination without changing any permissions in the --link-dest dir. -- Matt
Matthew, please remember to CC rsync@lists.samba.org . On Fri, 2009-02-06 at 22:33 -0500, Matthew Monaco wrote:> Matt McCutchen wrote: > > With --chmod and -p, the receiver will locally copy any --link-dest > > files that have the right data but the wrong permissions. This will > > give you the permissions you desire in the destination without changing > > any permissions in the --link-dest dir. > > What I'm concerned with is the fact that --chmod -p will create new > copies of files in the destination rather than create linksIn other words, you want rsync to hard-link the file and then change the permissions, affecting the permissions as seen in the --link-dest dir? IMHO that's a dodgy thing to do, and rsync probably won't support it; see: https://bugzilla.samba.org/show_bug.cgi?id=4793 If you're willing to let some permissions in the --link-dest dir change, why don't you just chmod everything in the dir at the beginning? -- Matt
Seemingly Similar Threads
- Permissions of the top-level destination directory without --perms
- How to delete files older than X on backup during sync?
- scp port on remote hosts
- Copying many sources to different places inside a destination
- DO NOT REPLY [Bug 6746] New: file from link-dest-source is copies and not linked for identical files