[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [rdiff-backup-users] rdiff-backup fails with forced-command but work
From: |
chuck odonnell |
Subject: |
Re: [rdiff-backup-users] rdiff-backup fails with forced-command but works through shell |
Date: |
Wed, 25 May 2011 11:53:56 -0400 |
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