[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [rdiff-backup-users] rdiff-backup fails with forced-command but work
Re: [rdiff-backup-users] rdiff-backup fails with forced-command but works through shell
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:
> ssh-rsa AAasdfaj23jasljjj..etc., etc.
> chmod 744 /usr/local/bin/hard-coded-rdiff
> ...so it should be executable by all. 'user' can execute /user/local/bin/
> #! /usr/bin/sh
> /usr/bin/rdiff-backup --server --restrict-read-only /
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,