Linux – svn command not found for specific user

linuxsshsvnUbuntu

I am implementing a system for exporting the source code from my svn server to the client's server (where the web is going to be hosted).

I asked my client to install subversion in his machine to be able to use the "svn export" command from his server command line via ssh.

I don't know how he has his server configured… I tested this in other local machines/servers, and I am able to retrieve the code from my server remotely, but in his server I get the error:

svn command not found

I told him to test with his user the "svn" command to check if it works, and he says that is ok for him "prompting type svn help… blabla". So I assume that is a permission issue.

What I have to tell him to do in his server to be able to access the svn command there? I tried to test it locally and in my server, but every new user I add (even with useradd and no specific permissions/groups) is able to access to the svn command, so I have no clues.

His machine is an Ubuntu 10.04.2 LTS

Any help appreciated.

EDIT————————————

Is ok to add ~/bin to $PATH and ln -s /usr/bin/svn to ~bin/svn?

Is ok to give an user in visudo NOPASSWD rights to a specific command (usr/bin/svn in this case), to be able to use "sudo svn"? This should do the trick.


P.S. Excuse my English, it isn't my native language.

Best Answer

This is not the answer to your problem, but further investigation steps. I didn't have much space and formatting in the comment.

I would investigate that user's startup scripts, like .profile or .bashrc to see if the path is altered. You can try to ask your customer to log in with SSH. The following commands show on my server that svn command is available for invocation

:~> echo $PATH
/home/djechelon/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games
:~> whereis svn
svn: /usr/bin/svn /usr/share/man/man1/svn.1.gz

Explanation: the first command shows the active PATH in Linux, and the second tells me where svn executable is located. Forget the svn.1.gz which is for man command.

Usually svn binary is in /usr/bin, which is usually under PATH. If your customer set up the machine and/or SVN differently then you might find something different.

Please bear in mind that you or your customer must log in to the server with the same account having trouble.

Related Topic