1

I found the following behaviour on a Synology RS814+

> ssh backup01 rsync
Permission denied, please try again.

> ssh backup01 'which rsync'
/usr/bin/rsync

> ssh backup01 'echo $PATH'
/usr/bin:/bin:/usr/sbin:/sbin

> ssh backup01 '/usr/bin/rsync'
[... rsync version and usage information ...]

Who can explain why the first and the last command don't do the same thing?

9
  • The last one works or it only shows info?
    – edumgui
    Apr 6, 2016 at 7:59
  • It only shows info, but that's what I expect it to do when I call it without arguments, so for the purpose of this demonstration it works.
    – jan
    Apr 6, 2016 at 10:18
  • My bad, the correct question should be: Can you rsync any file/folder using '/usr/bin/rsync'? Maybe rsync only runs on synology with some privileges.
    – edumgui
    Apr 6, 2016 at 10:27
  • No, the question is why the first and the last command don't do the same, I edited my question accordingly.
    – jan
    Apr 6, 2016 at 10:40
  • 1
    No, which doesn't show aliases (on all shells). Try type rsync. That usually is a shell built-in.
    – ams
    Apr 8, 2016 at 14:54

1 Answer 1

0

Parameters between `` runs locally.

If you login through ssh to RS814+ it says: which rsync >> /usr/syno/bin/rsync.

Rsync is intended for host to host transfer, and your system is asking his rsync location (alias) to Synology's one.

The correct way is:

ssh backup01 /usr/syno/bin/rsync

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .