Howto create new svn repos

From IridiaWiki
Revision as of 12:10, 8 August 2008 by Rogrady (talk | contribs)
Jump to navigationJump to search

You will need root access to the iridia server. Standard place to put repositories is /home/svn. Some legacy repositories are in /usr/local/share/svn_repositories.

  1. # REPOS_NAME='<name of your repository>'
  2. # REPOS_PATH='/home/svn'
  3. # svnadmin create ${REPOS_PATH}/${REPOS_NAME} --fs-type fsfs
  4. # groupadd ${REPOS_NAME}
  5. -> remove ! from /etc/gshadow in REPOS_NAME line
  6. # useradd ${REPOS_NAME} -g ${REPOS_NAME}
  7. -> Put * instead of ! in /etc/shadow in REPOSNAME line (= no login)
  8. -> Put all users into group line of REPOSNAME in /etc/group (COMMAS!!)
  9. -> Put all users into group line of svn_user in /etc/group (for higher level dir access)
  10. # cd ${REPOS_PATH}
  11. # chown -R ${REPOS_NAME}.${REPOS_NAME} ${REPOS_NAME}/
  12. # chmod -R o-rwx ${REPOS_NAME}
  13. # cd ${REPOS_NAME}
  14. # find . -type d -exec chmod 2770 {} \; # (2=setgid bit - new files have group of dir, not group of creating user)
  15. # find . -type f -exec chmod g+w {} \;