Subversion commands to add new user and grant all permissions

Sandeepan Nath picture Sandeepan Nath · Jul 28, 2010 · Viewed 32.8k times · Source

Currently, I am not able to commit with the SVN user I added. I tried by manually editing the svnserve.conf and passwd files. I did the following.

  • Added a line, harry = harrysecret, in passwd
  • Uncommented the line password-db = passwd in svnserve.conf
  • Added a system user, harry, with password = harrysecret as follows:-

    useradd harry passwd harry

I am using SVN+SSH protocol and am able to checkout, update but, while committing I am getting the error

Commit failed - Can't create directory 'path/to/repository/db/transactions/1852-1.txn' Permission denied

But, with root user I am able to commit.

I googled to find commands and found the following.

sudo htpasswd -m /etc/subversion/svn-auth-file sally
New password: *******
Re-type new password: *******
Adding password for user sally

(http://www.divvun.no/doc/infra/system/addsvn-users.html)

It did not work for me.

http://wiki.site5.com/SVN/Subversion_(SVN)_Setup_Guide#Setup_a_new_SVN_user_account

    cd ~
    mkdir .ssh
    chmod 700 .ssh
    touch .ssh/authorized_keys
    chmod 600 .ssh/authorized_keys

http://help.joyent.com/index.php?id=55&pg=kb.page

  • cd to the domain’s etc/ directory
  • with any text editor, edit ‘svn-access.conf’ by adding a ‘permission line’ for ‘newuser’ to an existing repository (repositories are created in webmin)
  • add a password for ‘newuser’ to the svn.basic.passwd file with bash$ htpasswd svn.basic.passwd newuser (it will prompt twice for the new password)

But, I do not have svn-access.conf in the /etc directory.

Are there sure shot ways to add users with all permissions? I need to instruct someone to do the same on a remote server.

Answer

Vasco Rinaldo picture Vasco Rinaldo · Jul 28, 2010

I never added a user in SVN. Try CHMOD 777 for all rights.