svn not prompting while access svn repo

raje@gworks.mobi
raje@gworks.mobi
I have installed svn 1.9.4(apache subversion) in fedora 23 follow this link https://www.if-not-true-then-false.com/2010/install-svn-subversion-server-on-fedora-centos-red-hat-rhel/  After Create and configure SVN repository, Restart the service then go to browser. http://localhost/svn/repo its not prompt to ask user name and password its goes directly repo files with out username and password.   These are my Configuration :  /etc/httpd/conf.modules.d/10-subversion.conf   LoadModule dav_svn_module modules/mod_dav_svn.so LoadModule authz_svn_module modules/mod_authz_svn.so LoadModule dontdothat_module modules/mod_dontdothat.so  
<Location /svn>    DAV svn    SVNParentPath /var/www/svn     # Limit write permission to list of valid users.    <LimitExcept GET PROPFIND OPTIONS REPORT>       # Require SSL connection for password protection.       # SSLRequireSSL        AuthType Basic       AuthName "Subversion repositories"       AuthUserFile /etc/svn-auth-users       Require valid-user    </LimitExcept> </Location>
   /var/www/svn/repo/conf/svnserve.conf  [general]  anon-access = none  auth-access = write  password-db = passwd  authz-db = authz   /var/www/svn/gworksrepo/conf/passwd   [users]  harry = harryssecret  sally = sallyssecret   Suggest me What's Wrong in my Configuration and how to fix this.     

Last updated

DougR
DougR
What's in your "svnserve.conf" file is immaterial when your access is going through Apache.  So your Apache config file needs to specify more stuff. Here's an example of what I mean:  
<Location /svn>     DAV svn     SVNParentPath /var/www/svn     AuthName "Subversion repositories"     AuthType Basic     AuthBasicProvider file     AuthUserFile /etc/svn-auth-users     Require valid-user     AuthzSVNAccessFile /opt/repo/ApacheAuthZ.conf   </Location>
  The "ApacheAuthZ.conf" file is the same format as the svnserve.conf's "authz-db" specified file but the section headers should have the repository name in them:  [repo1] harry = r sally = rw  [repo2] harry = rw sally = r  See here: http://svnbook.red-bean.com/en/1.8/svn.serverconfig.pathbasedauthz.html  NOTE WELL: I strongly recommend against using the "Limit" mechanisms since they are simply going to get you in trouble. They take an SVN *expert* to truly get right. I have seen their usage completely out of control without providing the appropriate restrictions, permissions, etc. For instance, there is a huge difference between the SVN 1 (https://svn.apache.org/repos/asf/subversion/trunk/notes/http-and-webdav/webdav-protocol) and SVN 2 (https://svn.apache.org/repos/asf/subversion/branches/master-passphrase/notes/http-and-webdav/http-protocol-v2.txt) webdav protocols and that impacts what is needed for the "Limit" mechanisms.
ArvedHS
ArvedHS
DougR, much obliged for that note about "Limit" in the Apache configuration. I had a new Subversion repository all set up, httpd all set up, htpassword accounts all set up, authz all set up, the SELinux contexts and context types etc were all good to go...and I couldn't log in from anything to save my life. Nothing was even asking for credentials. The Apache error_log unfortunately was not illuminating, precisely because it was the result of adding a . The only thing that saved me was reading your response here.  Once I finish setting up my new home dev environment (the usual routine after getting new kit) I'll probably learn up on why the caused such a blocker. More out of curiosity than because it's important. Thanks again.
DougR
DougR
Glad that it helped! Cheers.
palevi
palevi
I'm having a similar issue here:  * OS: CentOS Linux release 7.6.1810 (Core) * Apache: 2.4.6 * Subversion: 1.9.9-1 * Apache config file: LoadModule dav_svn_module modules/mod_dav_svn.so LoadModule authz_svn_module modules/mod_authz_svn.so 
<Location /svn>     DAV svn     SVNParentPath /opt/svn     AuthType Basic     AuthName "SVN Repos"     AuthUserFile /etc/htpasswd     AuthzSVNAccessFile /opt/svn/conf/authz     Require valid-user </Location>
  I don't see any related messages in apache or system logs, but I can't get the browser to ask for the password and the repository contents is displayed without any user authentificacion. I can't figure out what's wrong with my configuration ...  Regards,  Pablo.
DougR
DougR
Turn off SELinux if you find it on. Requires a reboot.  Make sure that all path components (e.g. "/", "/opt", "/opt/svn", "/opt/svn/reponame") are properly owned, grouped and permissioned.  Make sure that your "/var/log/httpd" directory is properly protected, etc.  If you're not starting Apache as "root" then it won't be able to log into the normal location so you'll need to choose paths for logs, etc. that work. And you're going to need to use a port > 1024.
palevi
palevi
Weird:  I set SELinux to permissive:  sudo setenforce Permissive  and it started to prompt for password as expected. Aha, an SELinux issue!. Just to make sure, I set SELinux to enforcing and test if it fails again ...  sudo setenforce Enforcing  but it keeps prompting for password! I rebooted, and it keeps working ...  I don't understand what has happened here, but now I get my system working as expected, thanks a lot for pointing me in the right direction ...  Cheers!
DougR
DougR
That's strange. I hope it keeps on working. Cheers.

1-9 of 9

Reply to this discussion

You cannot edit posts or make replies: You should be logged in before you can post.