1

I put directory svn and svn-auth in /var/www and already change owner and set permission with chown -R apache.apache /var/www/svn* and chmod 600 -R /var/www/svn*

My configuration

svn.mydomain.com.conf

<VirtualHost 127.0.0.1:8080> ServerName svn.mydomain.com <Location /> DAV svn SVNPath /var/www/svn/REPOSITORY_NAME AuthType Basic AuthName "Subversion repositories" AuthUserFile /var/www/svn-auth/passwd Require valid-user </Location> </VirtualHost> 

some modification httpd.conf

Listen 8080 DocumentRoot "/var/www/" <Directory "/var/www"> 

nginx svn.mydomain.com.conf

server { server_name svn.mydomain.com; location / { proxy_pass http://127.0.0.1:8080; } } 

when try access svn.mydomain.com/project1 I cannot login and receive this error_log

 [Fri Feb 01 04:36:30 2013] [error] [client 127.0.0.1] (13)Permission denied: Could not open password file: /var/www/svn-auth/passwd [Fri Feb 01 04:36:30 2013] [error] [client 127.0.0.1] access to /project1 failed, reason: verification of user id 'myuser' not configured 

I try use AuthUserFile /etc/httpd/svn-auth/passwd then I can login but cannot access file with this error_log

 [Fri Feb 01 05:01:31 2013] [error] [client 127.0.0.1] (20014)Internal error: Can't open file '/var/www/svn/REPOSITORY_NAME/format': Permission denied [Fri Feb 01 05:01:31 2013] [error] [client 127.0.0.1] Could not fetch resource information. [500, #0] [Fri Feb 01 05:01:31 2013] [error] [client 127.0.0.1] Could not open the requested SVN filesystem [500, #13] [Fri Feb 01 05:01:31 2013] [error] [client 127.0.0.1] Could not open the requested SVN filesystem [500, #13] [Fri Feb 01 05:01:32 2013] [error] [client 127.0.0.1] (20014)Internal error: Can't open file '/var/www/svn/REPOSITORY_NAME/format': Permission denied [Fri Feb 01 05:01:32 2013] [error] [client 127.0.0.1] Could not fetch resource information. [500, #0] [Fri Feb 01 05:01:32 2013] [error] [client 127.0.0.1] Could not open the requested SVN filesystem [500, #13] [Fri Feb 01 05:01:32 2013] [error] [client 127.0.0.1] Could not open the requested SVN filesystem [500, #13] 

Please help!!!! Thank you very much.

1
  • If you are using RHEL/CentOS check if SELinux is go blame (/var/log/auditd.log) Commented Feb 1, 2013 at 12:48

2 Answers 2

3

Set +x permissions to directories as:

chmod 700 -R /var/www/svn* 

Its because directories are data files that hold two pieces of information for each file within, the file's name and it's inode number. Read permission is needed to access the names of files in a directory. Execute permission is needed to access the inodes of files in a directory, if you already know the file's name.

3
  • thank you so much. Now I can fix permission deny problem. But new obstacle occure can you help me how to access correct repository path here serverfault.com/questions/474579/… Thank you so much. Commented Feb 1, 2013 at 15:32
  • 700 didn't work for me, but 777 did the trick. Commented Oct 24, 2014 at 16:29
  • Instead of explicitly defining 700, I think it would be a better option to use chmod +x -R /var/www/svn* because sometimes you might want to allow access to the group. On the other hand 777 would be too open. Commented Nov 28, 2015 at 17:54
2

i solved the access problem giving 777 on www-data:www-data with commands chmod and own on var and var www and all that is below of it (-R),tested with web browser i can explore the repositorys

1
  • becouse my repository are under var/www/repos Commented Oct 1, 2014 at 7:32

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.