Permissions problems with Apache / SVN
Posted
by
Fred Wuerges
on Server Fault
See other posts from Server Fault
or by Fred Wuerges
Published on 2012-12-12T21:34:12Z
Indexed on
2012/12/12
23:05 UTC
Read the original article
Hit count: 447
I am installed a SVN server (v1.6) on a VPS contracted with CentOS 5, Apache 2.2 with WHM panel.
I installed and configured all necessary modules and am able to create and access repositories via my web browser normally.
The problem: I can not commit or import anything, always return permission errors:
First error:
Can not open file '/var/www/svn/test/db/txn-current-lock': Permission denied
After fix the previous error:
Can't open '/var/www/svn/test/db/tempfile.tmp': Permission denied
And other... (and happends many others)
Can't open file '/var/www/svn/test/db/txn-protorevs/0-1m.rev': Permission denied
I've read and executed permissions on numerous tutorials regarding this errors, all without success. I've defined the owner as apache
or nobody
and different permissions for folders and files.
I'm using TortoiseSVN to connect to the server.
Some information that may find useful:
- I'm trying to perform commit through an external HTTP connection, like:
svn commit http://example.com/svn/test
- SELinux is disabled.
sestatus
returnsSELinux status: disabled
- Running the command to see the active processes of Apache, some processes are left with user/group "nobody". I tried changing the settings of Apache to not run with that user/group, but all my websites stopped working, returning this error:
Forbidden You don't have permission to access / on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
- Apache process list:
root@vps [/var/www]# ps aux | egrep '(apache|httpd)' root 19904 0.0 4.4 133972 35056 ? Ss 16:58 0:00 /usr/local/apache/bin/httpd -k start -DSSL nobody 20401 0.0 3.5 133972 27772 ? S 17:01 0:00 /usr/local/apache/bin/httpd -k start -DSSL root 20409 0.0 3.4 133972 27112 ? S 17:01 0:00 /usr/local/apache/bin/httpd -k start -DSSL nobody 20410 0.0 3.8 190040 30412 ? Sl 17:01 0:00 /usr/local/apache/bin/httpd -k start -DSSL nobody 20412 0.0 3.9 190344 30944 ? Sl 17:01 0:00 /usr/local/apache/bin/httpd -k start -DSSL nobody 20414 0.0 4.4 190160 35364 ? Sl 17:01 0:00 /usr/local/apache/bin/httpd -k start -DSSL nobody 20416 0.0 4.0 190980 32108 ? Sl 17:01 0:00 /usr/local/apache/bin/httpd -k start -DSSL nobody 20418 0.3 5.3 263028 42328 ? Sl 17:01 0:12 /usr/local/apache/bin/httpd -k start -DSSL root 32409 0.0 0.1 7212 816 pts/0 R+ 17:54 0:00 egrep (apache|httpd)
SVN folder permission var/www/
:
drwxrwxr-x 3 apache apache 4096 Dec 11 16:41 svn/
Repository permission var/www/svn/
:
drwxrwxr-x 6 apache apache 4096 Dec 11 16:41 test/
Internal folders of repository var/www/svn/test
:
drwxrwxr-x 2 apache apache 4096 Dec 11 16:41 conf/
drwxrwxr-x 6 apache apache 4096 Dec 11 16:41 db/
-rwxrwxr-x 1 apache apache 2 Dec 11 16:41 format*
drwxrwxr-x 2 apache apache 4096 Dec 11 16:41 hooks/
drwxrwxr-x 2 apache apache 4096 Dec 11 16:41 locks/
-rwxrwxr-x 1 apache apache 229 Dec 11 16:41 README.txt*
© Server Fault or respective owner