add svn repository
1. add one svn user and group
$ useradd svn -c "SVN Owner" -s /bin/false
(-c comment, -s shell , here no shell access)
2. If we want more than one repository then add group for each one.
$ groupadd reposgp
$ usermod -G reposgp svn
(Add this group to svn user/group)
3. Create a Subversion repository
We are creating it at /var ; svn will be the folder containing all repos
$ install -v -m 0755 -o svn -g svn -d /var/svn
$ svnadmin create --fs-type fsfs /var/svn/repos
(Here 'repos' will be our repos)
Now we can import some files/dir to the repos
$ svn import -m "Initial import." /path/to/source/tree
file:///var/svn/repos
Now change owner and group information on the repository, and add
an unprivileged user to the svn and reposgp groups:
$ chown -R svn:odotgp /var/svn/repos
$ chmod -R g+w /var/svn/repos
$ chmod g+s /var/svn/repos/db
$ usermod -G svn,repsogp sanjay
(here sanjay is already a user in the system)
We can verify the existing groups of user with the commands
$ groups sanjay
No comments:
Post a Comment