Pavel Alexeev
2015-Oct-11 10:17 UTC
rsync always try change owner and group of symlink in --fake-super mode
Hi all. I long time discover strange to me behavior. If I add --fake-super option on both sides rsync start always set owner and group of symlink. What interesting there no error, but it done each time as it has been changed. Simple reproduce: $ mkdir rsync.symlinks $ echo 'file content' > rsync.symlinks/file.itself $ ln -s file.itself rsync.symlinks/file.symlink Then try to transfer it on remote host: $ rsync -apr --links --itemize-changes --fake-super -M--fake-super rsync.symlinks backup at store.hubbitus.info:~/temp/rsync.symlinks cd+++++++++ rsync.symlinks/ <f+++++++++ rsync.symlinks/file.itself cL+++++++++ rsync.symlinks/file.symlink -> file.itself And again: .L....og... rsync.symlinks/file.symlink -> file.itself I had tried use --rsync-path="rsync --fake-super" instead of -M--fake-super what unsurprisingly give me same result: $ rsync -apr --links --itemize-changes --fake-super --rsync-path="rsync --fake-super" rsync.symlinks backup at store.hubbitus.info:~/temp/rsync.symlinks .L....og... rsync.symlinks/file.symlink -> file.itself Is it a bug and have worth to fill issue? -- With best wishes, Pavel Alexeev
Joe
2015-Oct-11 17:54 UTC
rsync always try change owner and group of symlink in --fake-super mode
ln -s real-file symlink file.itself is ./rsync.symlinks/file.itself, but you are trying to link ./file.itself (which presumably doesn't exist) to the real file. Since a symlink is just a pointer, it gets created, but doesn't point to any real file. Try: ln -s rsync.symlinks/file.itself . Joe On 10/11/2015 06:17 AM, Pavel Alexeev wrote:> Hi all. > > I long time discover strange to me behavior. If I add --fake-super > option on both sides rsync start always set owner and group of symlink. > What interesting there no error, but it done each time as it has been > changed. > > Simple reproduce: > $ mkdir rsync.symlinks > $ echo 'file content' > rsync.symlinks/file.itself > $ ln -s file.itself rsync.symlinks/file.symlink > > Then try to transfer it on remote host: > $ rsync -apr --links --itemize-changes --fake-super -M--fake-super > rsync.symlinks backup at store.hubbitus.info:~/temp/rsync.symlinks > cd+++++++++ rsync.symlinks/ > <f+++++++++ rsync.symlinks/file.itself > cL+++++++++ rsync.symlinks/file.symlink -> file.itself > > And again: > .L....og... rsync.symlinks/file.symlink -> file.itself > > > I had tried use --rsync-path="rsync --fake-super" instead of > -M--fake-super what unsurprisingly give me same result: > $ rsync -apr --links --itemize-changes --fake-super --rsync-path="rsync > --fake-super" rsync.symlinks > backup at store.hubbitus.info:~/temp/rsync.symlinks > .L....og... rsync.symlinks/file.symlink -> file.itself > > Is it a bug and have worth to fill issue? > > -- > With best wishes, Pavel Alexeev >
Pavel Alexeev
2015-Oct-12 12:30 UTC
rsync always try change owner and group of symlink in --fake-super mode
No, no. All symlinks correct, look: $ LANG=en_US.utf-8 ls -l rsync.symlinks total 4 -rw-rw-r--. 1 pasha pasha 13 Oct 11 06:10 file.itself lrwxrwxrwx. 1 pasha pasha 11 Oct 11 06:11 file.symlink -> file.itself $ cat rsync.symlinks/file.symlink file content It also correct on receiver side. On 11.10.2015 20:54, Joe wrote:> ln -s real-file symlink > file.itself is ./rsync.symlinks/file.itself, but you are trying to link > ./file.itself (which presumably doesn't exist) to the real file. > > Since a symlink is just a pointer, it gets created, but doesn't point > to any real file. > > Try: > > ln -s rsync.symlinks/file.itself . > > Joe > > On 10/11/2015 06:17 AM, Pavel Alexeev wrote: >> Hi all. >> >> I long time discover strange to me behavior. If I add --fake-super >> option on both sides rsync start always set owner and group of symlink. >> What interesting there no error, but it done each time as it has been >> changed. >> >> Simple reproduce: >> $ mkdir rsync.symlinks >> $ echo 'file content' > rsync.symlinks/file.itself >> $ ln -s file.itself rsync.symlinks/file.symlink >> >> Then try to transfer it on remote host: >> $ rsync -apr --links --itemize-changes --fake-super -M--fake-super >> rsync.symlinks backup at store.hubbitus.info:~/temp/rsync.symlinks >> cd+++++++++ rsync.symlinks/ >> <f+++++++++ rsync.symlinks/file.itself >> cL+++++++++ rsync.symlinks/file.symlink -> file.itself >> >> And again: >> .L....og... rsync.symlinks/file.symlink -> file.itself >> >> >> I had tried use --rsync-path="rsync --fake-super" instead of >> -M--fake-super what unsurprisingly give me same result: >> $ rsync -apr --links --itemize-changes --fake-super --rsync-path="rsync >> --fake-super" rsync.symlinks >> backup at store.hubbitus.info:~/temp/rsync.symlinks >> .L....og... rsync.symlinks/file.symlink -> file.itself >> >> Is it a bug and have worth to fill issue? >> >> -- >> With best wishes, Pavel Alexeev >> >
Apparently Analagous Threads
- rsync always try change owner and group of symlink in --fake-super mode
- [Bug 11558] New: rsync always try change owner and group of symlink in --fake-super mode
- [Bug 12820] New: rsync always try change owner and group of symlink in --fake-super mode
- [Bug 10496] New: --itemize-changes always reports xattr changes with --xattrs --fake-super
- DO NOT REPLY [Bug 7110] New: Symlink fake-super data is silently lost when sys_lsetxattr fails with EPERM