You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by kristofer hansson <kr...@gmail.com> on 2006/06/01 00:16:17 UTC

svn: Can't create directory '/subversion/main/db/transactions/0-1.txn': Permission denied

Hi

Im having some problems with subversion, or more specific, with
importing or committing using http://, checking out works fine using
http://

using http://
svn import mp/ http://localhost/subversion/main/my -m "ii"
svn: Can't create directory
'/subversion/main/db/transactions/0-1.txn': Permission denied

the apache log file /var/log/httpd/error_log reveals:
[error] [client 127.0.0.1] Can't create directory
'/subversion/main/db/transactions/1-1.txn': Permission denied  [500,
#13]

using file:// works fine!
svn import mp/ file://localhost/subversion/main/my -m "ii"
Adding         mp/trunk
Adding         mp/trunk/source
Adding         mp/trunk/source/test.c

Committed revision 1.

I have taken a look at every hit on google and havn't found a good answer :(
Im running Fedora Core 5 with apache2 (package: httpd version 2.2.0
release 5.1.2), Subversion 1.3.1 (r19032).

As root:
mkdir /subversion
svnadmin create /subversion/repo

chown -R apache.apache /subversion
chmod -R 777 /subversion

Apache is running as apache / apache

Pls help!

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

Re: svn: Can't create directory '/subversion/main/db/transactions/0-1.txn': Permission denied

Posted by Nico Kadel-Garcia <nk...@comcast.net>.
kristofer hansson wrote:
> As seen in my original mail I had already set the owner and group of
> the subversion dir to the same as apache is running as. After som more
> research I found that the problem was SELinux running, and it did in
> some way restrict the permissions regarding apache. After having
> temporarily turned of SELinux using "setenforce 0" all worked
> flawlessly
>
> Thanks for the quick answers! love to see an active forum such as
> this.
> /Kristofer

That's going to happen to other people: If you can work with the SELinux and 
publish how to tweak it for Subversion, I bet it would be helpful to other 
RedHat users. 

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

Re: svn: Can't create directory '/subversion/main/db/transactions/0-1.txn': Permission denied

Posted by kristofer hansson <kr...@gmail.com>.
As seen in my original mail I had already set the owner and group of
the subversion dir to the same as apache is running as. After som more
research I found that the problem was SELinux running, and it did in
some way restrict the permissions regarding apache. After having
temporarily turned of SELinux using "setenforce 0" all worked
flawlessly

Thanks for the quick answers! love to see an active forum such as this.

/Kristofer

On 6/1/06, Steve Martin <sm...@gmail.com> wrote:
> chown -R apache:apache subversion/repo/dir
>
> has worked for me... never needed to worry about setting any other
> permissions.
>
> btw, for those who read this, we also figured out how to get subversion to
> keep proper unix permissions and executable bits when importing a buildable
> version of code..
>
> IF anyone wants to know, I can give a quick explanation.
>
>
>
>
> On 5/31/06, Rick Jones <rick.jones2@hp.com > wrote:
> > kristofer hansson wrote:
> > > Hi
> > >
> > > Im having some problems with subversion, or more specific, with
> > > importing or committing using http://, checking out works fine using
> > > http://
> > >
> > > using http://
> > > svn import mp/ http://localhost/subversion/main/my -m
> "ii"
> > > svn: Can't create directory
> > > '/subversion/main/db/transactions/0-1.txn': Permission
> denied
> > >
> > > the apache log file /var/log/httpd/error_log reveals:
> > > [error] [client 127.0.0.1] Can't create directory
> > > '/subversion/main/db/transactions/1-1.txn': Permission
> denied  [500,
> > > #13]
> > >
> > > using file:// works fine!
> > > svn import mp/ file://localhost/subversion/main/my -m
> "ii"
> > > Adding         mp/trunk
> > > Adding         mp/trunk/source
> > > Adding         mp/trunk/source/test.c
> >
> >
> > Ooh I think I can answer that because someone just answered that for me :)
> >
> > When you create via file: the repo is owned by your userid.  When you go
> > to access via http, the apache user id is the one used.  So, I believe
> > you need to alter ownership/permissions in the repo to have the group be
> > apache's and make group in your repo writable by apache.
> >
> > > Committed revision 1.
> > >
> > > I have taken a look at every hit on google and havn't found a good
> > > answer :(
> > > Im running Fedora Core 5 with apache2 (package: httpd version 2.2.0
> > > release 5.1.2), Subversion 1.3.1 (r19032).
> > >
> > > As root:
> > > mkdir /subversion
> > > svnadmin create /subversion/repo
> > >
> > > chown -R apache.apache /subversion
> > > chmod -R 777 /subversion
> >
> > I applied these:
> >
> > chown -R :www-data briefs/
> >
> > where briefs was under my /svn (or in your case /subversion I suspect)
> >
> > www:/svn# more permission_fixup_instructions
> > chmod -R g+w *; chmod 444 format
> > find . -type d -exec chmod g+s {} \;
> >
> > which I got from somewhere - maybe from one of the docs, I'm not sure.
> >
> > (do be careful with the "*" there :)
> >
> > rick jones
> >
> > >
> > > Apache is running as apache / apache
> > >
> > > Pls help!
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> users-unsubscribe@subversion.tigris.org
> > > For additional commands, e-mail:
> users-help@subversion.tigris.org
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> users-unsubscribe@subversion.tigris.org
> > For additional commands, e-mail:
> users-help@subversion.tigris.org
> >
> >
>
>

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

Re: svn: Can't create directory '/subversion/main/db/transactions/0-1.txn': Permission denied

Posted by Steve Martin <sm...@gmail.com>.
chown -R apache:apache subversion/repo/dir

has worked for me... never needed to worry about setting any other
permissions.

btw, for those who read this, we also figured out how to get subversion to
keep proper unix permissions and executable bits when importing a buildable
version of code..

IF anyone wants to know, I can give a quick explanation.



On 5/31/06, Rick Jones <ri...@hp.com> wrote:
>
> kristofer hansson wrote:
> > Hi
> >
> > Im having some problems with subversion, or more specific, with
> > importing or committing using http://, checking out works fine using
> > http://
> >
> > using http://
> > svn import mp/ http://localhost/subversion/main/my -m "ii"
> > svn: Can't create directory
> > '/subversion/main/db/transactions/0-1.txn': Permission denied
> >
> > the apache log file /var/log/httpd/error_log reveals:
> > [error] [client 127.0.0.1] Can't create directory
> > '/subversion/main/db/transactions/1-1.txn': Permission denied  [500,
> > #13]
> >
> > using file:// works fine!
> > svn import mp/ file://localhost/subversion/main/my -m "ii"
> > Adding         mp/trunk
> > Adding         mp/trunk/source
> > Adding         mp/trunk/source/test.c
>
>
> Ooh I think I can answer that because someone just answered that for me :)
>
> When you create via file: the repo is owned by your userid.  When you go
> to access via http, the apache user id is the one used.  So, I believe
> you need to alter ownership/permissions in the repo to have the group be
> apache's and make group in your repo writable by apache.
>
> > Committed revision 1.
> >
> > I have taken a look at every hit on google and havn't found a good
> > answer :(
> > Im running Fedora Core 5 with apache2 (package: httpd version 2.2.0
> > release 5.1.2), Subversion 1.3.1 (r19032).
> >
> > As root:
> > mkdir /subversion
> > svnadmin create /subversion/repo
> >
> > chown -R apache.apache /subversion
> > chmod -R 777 /subversion
>
> I applied these:
>
> chown -R :www-data briefs/
>
> where briefs was under my /svn (or in your case /subversion I suspect)
>
> www:/svn# more permission_fixup_instructions
> chmod -R g+w *; chmod 444 format
> find . -type d -exec chmod g+s {} \;
>
> which I got from somewhere - maybe from one of the docs, I'm not sure.
>
> (do be careful with the "*" there :)
>
> rick jones
>
> >
> > Apache is running as apache / apache
> >
> > Pls help!
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> > For additional commands, e-mail: users-help@subversion.tigris.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>

Re: svn: Can't create directory '/subversion/main/db/transactions/0-1.txn': Permission denied

Posted by Rick Jones <ri...@hp.com>.
kristofer hansson wrote:
> Hi
> 
> Im having some problems with subversion, or more specific, with
> importing or committing using http://, checking out works fine using
> http://
> 
> using http://
> svn import mp/ http://localhost/subversion/main/my -m "ii"
> svn: Can't create directory
> '/subversion/main/db/transactions/0-1.txn': Permission denied
> 
> the apache log file /var/log/httpd/error_log reveals:
> [error] [client 127.0.0.1] Can't create directory
> '/subversion/main/db/transactions/1-1.txn': Permission denied  [500,
> #13]
> 
> using file:// works fine!
> svn import mp/ file://localhost/subversion/main/my -m "ii"
> Adding         mp/trunk
> Adding         mp/trunk/source
> Adding         mp/trunk/source/test.c


Ooh I think I can answer that because someone just answered that for me :)

When you create via file: the repo is owned by your userid.  When you go 
to access via http, the apache user id is the one used.  So, I believe 
you need to alter ownership/permissions in the repo to have the group be 
apache's and make group in your repo writable by apache.

> Committed revision 1.
> 
> I have taken a look at every hit on google and havn't found a good 
> answer :(
> Im running Fedora Core 5 with apache2 (package: httpd version 2.2.0
> release 5.1.2), Subversion 1.3.1 (r19032).
> 
> As root:
> mkdir /subversion
> svnadmin create /subversion/repo
> 
> chown -R apache.apache /subversion
> chmod -R 777 /subversion

I applied these:

chown -R :www-data briefs/

where briefs was under my /svn (or in your case /subversion I suspect)

www:/svn# more permission_fixup_instructions
chmod -R g+w *; chmod 444 format
find . -type d -exec chmod g+s {} \;

which I got from somewhere - maybe from one of the docs, I'm not sure.

(do be careful with the "*" there :)

rick jones

> 
> Apache is running as apache / apache
> 
> Pls help!
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org

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