Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.


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.

share|improve this question
He needs to have his $PATH set to include the path to svn. – Jenny D May 8 '13 at 10:34
Read my edit if you can, please. Is ok to do that? Thank you! – sh4 May 8 '13 at 11:04
You should NOT have him use sudo to run svn. If he does that, all his svn commands would be run as root, not as the user. This is probably not what you want! – Jenny D May 9 '13 at 5:44

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
:~> 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.

share|improve this answer
bash-4.1$ echo $PATH --> /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games <--- Apparently /usr/bin where the svn command is, is in my $PATH, but if I try access it I cannot. An ls over /usr/ only lists the "lib" folder, so I have a very restricted user I suppose. Another solution I have thinked is via sudo/visudo, giving NOPASSWD rights to my user over the /usr/bin/svn command. I don't know if is that ok in terms of security? Thank you! – sh4 May 8 '13 at 13:39
You may be in some kind of jailed shell , in that case sudo won't work either. I suggest you export the code on your own machine, then ftp/scp/etc to the server. It will be much easier. – Sandor Marton May 8 '13 at 14:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.