Juned
Juned

Reputation: 6326

Permission is not being set to the SVN repository users

I have just setup the SVN server in my local network. For that i followed this link. But my problem is whatever user i have created in my /etc/svn-auth-conf file are only allowed to do checkout and commit,in fact this user have all rights. How do i restrict their permissions?

Here is my /etc/httpd/conf.d/subversion.conf file

LoadModule dav_svn_module     modules/mod_dav_svn.so
LoadModule authz_svn_module   modules/mod_authz_svn.so

<Location /repos>
   DAV svn
   SVNParentPath /var/www/html/svn
   AuthType Basic
   AuthName "Subversion repos"
   AuthUserFile /etc/svn-auth-conf
   Require valid-user
</Location>

And the other thing is, when i am creating any repository using svnadmin command then diffrent configuration file is been created in repositories conf folder like authz,passwd,svnserve.conf. I followed this link for setting permissions.

So how do i set the specific permission to specific users ?

i.e

user1=All permissions
user2=read
other=none

Upvotes: 1

Views: 1941

Answers (2)

jachguate
jachguate

Reputation: 17203

For access via http, you have to include permisions on a per-folder basis in your authz file

like this:

[/]
#rw is read-write, r is read only, and empty is none
user1 = rw
user2 = r
* =

You can also define groups of users in the [groups] section, and assign permissions using the @group_name like this:

[groups]
dev = jdoe,user3
qa = user4,user5

[/some/other/path]
@dev = rw
@qa = r
* =

Edit Finally, your apache conf is missing a vital part, it have to include the AuthzSVNAccessFile directive, something like:

    <Location /project/src>
            DAV svn
            SVNPath /var/svn/project
            AuthzSVNAccessFile /var/svn/project/conf/authz
            AuthType Basic
            AuthName "Project source repository"
            AuthUserFile /var/svn/.dav_svn.passwd
            Require valid-user
    </Location>

Upvotes: 2

Shamis Shukoor
Shamis Shukoor

Reputation: 2515

Use

 chown -R groupname:groupname folder
 chmod -R <permission> directory-name/

permission can be 766 for user to read write and execute and for others and group to read and write

Check the man pages for more information

to set the user and read or write restrictions

Upvotes: 0

Related Questions