You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Sonal Uphale <su...@savvion.com> on 2007/05/22 13:59:52 UTC

commit with owner and group of my repository as unix user

Hi all,
I have configured subversion1.4.3 on RHEL5 with apache2. The owner and group of my 
repository is sbmrepos. The repository is given full permissions (777). Here if I try to commit, 
then I was getting error as 

svn: Commit failed (details follow):
svn: Can't open activity db: Permission denied

So I changed owner and group to apache, and then I could commit.
However, I want to retain owner and group of my repository as sbmrepos, How can I achieve this?

Thanks,
Sonal.

Re: commit with owner and group of my repository as unix user

Posted by Ryan Schmidt <su...@ryandesign.com>.
On May 24, 2007, at 23:52, Sonal Uphale wrote:

>> Let's say that your repository is "/var/svn" (you've previously done
>> "svnadmin create /var/svn") and your Apache server runs as the user
>> "www" in the group "www". Then I think the best way to set it up is
>> probably:
>>
>> chown -R www:www /var/svn
>> chmod -R 700 /var/svn
>> find /var/svn -type f -print0 | xargs -0 chmod 600
>>
>> Now everything is owned by the user under which Apache runs,
>> directories have 700 (a.k.a. "rwx") permission, and files have 600
>> (a.k.a. "rw-") permission. This ensures that the only way to access
>> the repository is through Apache, so that you don't have to worry
>> about anybody being able to get access to data in the repository by
>> copying the revision files off the server directly.
>
> I have repository under /home/sbmrepos/svn.
> It is owned by sbmrepos.
> In apache httpd.conf, I have made entry as
> User sbmrepos
> Group sbmrepos
>
> <Location /svn>
>         DAV svn
>         SVNParentPath /home/sbmrepos/svn
> </Location>
>
> After this I restarted the httpd server and when I try to access  
> server it
> gives error:
> <D:error>
> <C:error/>
> <m:human:readable errcode="13">Could not open the requested SVN
> filesystem</m:human-readble>
> </D:error>
>
> Apache log is :
> Thu May 24 21:31:36 2007] [error] [client 127.0.0.1] (20014) 
> Internal error:
> Can't open file '/home/sbmrepos/svn/sbmrepos/format': Permission  
> denied
> [Thu May 24 21:31:36 2007] [error] [client 127.0.0.1] Could not fetch
> resource information.  [500, #0]
> [Thu May 24 21:31:36 2007] [error] [client 127.0.0.1] Could not  
> open the
> requested SVN filesystem  [500, #13]
> [Thu May 24 21:31:36 2007] [error] [client 127.0.0.1] Could not  
> open the
> requested SVN filesystem  [500, #13]
>
> From the forum mails, it is permissions issue, but can anybody please
> elaborate on it.

Everything you've said sounds reasonable...

Looking back through the thread, I see you're using RHEL5. Are you  
also using SELinux? If so, you also have to do some additional setup  
with the chcon command which is described here:

http://subversion.tigris.org/faq.html#reposperms


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: commit with owner and group of my repository as unix user

Posted by Sonal Uphale <su...@savvion.com>.
> Let's say that your repository is "/var/svn" (you've previously done
> "svnadmin create /var/svn") and your Apache server runs as the user
> "www" in the group "www". Then I think the best way to set it up is
> probably:
>
> chown -R www:www /var/svn
> chmod -R 700 /var/svn
> find /var/svn -type f -print0 | xargs -0 chmod 600
>
> Now everything is owned by the user under which Apache runs,
> directories have 700 (a.k.a. "rwx") permission, and files have 600
> (a.k.a. "rw-") permission. This ensures that the only way to access
> the repository is through Apache, so that you don't have to worry
> about anybody being able to get access to data in the repository by
> copying the revision files off the server directly.


I have repository under /home/sbmrepos/svn.
It is owned by sbmrepos.
In apache httpd.conf, I have made entry as
User sbmrepos
Group sbmrepos

<Location /svn>
        DAV svn
        SVNParentPath /home/sbmrepos/svn
</Location>

After this I restarted the httpd server and when I try to access server it
gives error:
<D:error>
<C:error/>
<m:human:readable errcode="13">Could not open the requested SVN
filesystem</m:human-readble>
</D:error>

Apache log is :
Thu May 24 21:31:36 2007] [error] [client 127.0.0.1] (20014)Internal error:
Can't open file '/home/sbmrepos/svn/sbmrepos/format': Permission denied
[Thu May 24 21:31:36 2007] [error] [client 127.0.0.1] Could not fetch
resource information.  [500, #0]
[Thu May 24 21:31:36 2007] [error] [client 127.0.0.1] Could not open the
requested SVN filesystem  [500, #13]
[Thu May 24 21:31:36 2007] [error] [client 127.0.0.1] Could not open the
requested SVN filesystem  [500, #13]

Re: commit with owner and group of my repository as unix user

Posted by Ryan Schmidt <su...@ryandesign.com>.
On May 23, 2007, at 04:35, Sonal Uphale wrote:

>> My impression is that it should have worked if you had everything set
>> to 777. The fact that it didn't work suggests that maybe some part of
>> the repository wasn't 777.
> I checked the permissions, and they are 777 alright.
>
>> The correct way to set up a repository with Apache is to have it
>> owned by the user under which Apache runs, and to set the permissions
>> so that only that user can read/write (700 permissions on
>> directories, 600 on files).
> Ryan: I still did not get this, can you please explain it further.

Let's say that your repository is "/var/svn" (you've previously done  
"svnadmin create /var/svn") and your Apache server runs as the user  
"www" in the group "www". Then I think the best way to set it up is  
probably:

chown -R www:www /var/svn
chmod -R 700 /var/svn
find /var/svn -type f -print0 | xargs -0 chmod 600

Now everything is owned by the user under which Apache runs,  
directories have 700 (a.k.a. "rwx") permission, and files have 600  
(a.k.a. "rw-") permission. This ensures that the only way to access  
the repository is through Apache, so that you don't have to worry  
about anybody being able to get access to data in the repository by  
copying the revision files off the server directly.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: commit with owner and group of my repository as unix user

Posted by Sonal Uphale <su...@savvion.com>.
> My impression is that it should have worked if you had everything set  
> to 777. The fact that it didn't work suggests that maybe some part of  
> the repository wasn't 777.
I checked the permissions, and they are 777 alright.
 
> The correct way to set up a repository with Apache is to have it  
> owned by the user under which Apache runs, and to set the permissions  
> so that only that user can read/write (700 permissions on  
> directories, 600 on files).
Ryan: I still did not get this, can you please explain it further.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: commit with owner and group of my repository as unix user

Posted by Ryan Schmidt <su...@ryandesign.com>.
On May 22, 2007, at 08:59, Sonal Uphale wrote:

> I have configured subversion1.4.3 on RHEL5 with apache2. The owner  
> and group of my
> repository is sbmrepos. The repository is given full permissions  
> (777). Here if I try to commit,
> then I was getting error as
>
> svn: Commit failed (details follow):
> svn: Can't open activity db: Permission denied
>
> So I changed owner and group to apache, and then I could commit.
> However, I want to retain owner and group of my repository as  
> sbmrepos, How can I achieve this?

My impression is that it should have worked if you had everything set  
to 777. The fact that it didn't work suggests that maybe some part of  
the repository wasn't 777.

The correct way to set up a repository with Apache is to have it  
owned by the user under which Apache runs, and to set the permissions  
so that only that user can read/write (700 permissions on  
directories, 600 on files).


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org