On Tue, May 24, 2011 at 12:50:47PM -0400, Richard Freytag wrote:
> 
> The Error
> 
> The problem is that if I want to "force the command" on the server
> by altering the server-side public key so it looks for
> '/usr/local/bin/hard-coded-rdiff' as follows:
> 
> from="client",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty,command="/usr/local/bin/hard-coded-rdiff"
>  ssh-rsa AAasdfaj23jasljjj..etc., etc. 
> 
[snip]
> 
> chmod 744 /usr/local/bin/hard-coded-rdiff
> 
> ...so it should be executable by all. 'user' can execute /user/local/bin/
> hard-coded-rdiff.
> 
[snip]
> #! /usr/bin/sh
> 
> /usr/bin/rdiff-backup --server --restrict-read-only /

Hi,

You need to 'exec rdiff-backup ...' rather than calling it.

  exec /usr/local/bin/rdiff-backup --server

Not sure why you want "executable by all" on your script, should only
need to be executable by the backup user?

Also, depending on what you are doing, you may need to export PATH in
the script since .profile is not executed by the sshd in this case,
e.g.,

  #!/bin/sh
  export PATH=/usr/bin:/bin:/usr/sbin:/sbin

Good luck.

Best,

Chuck

_______________________________________________
rdiff-backup-users mailing list at [email protected]
https://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki

Reply via email to