Announcement

Collapse
No announcement yet.

svn not prompting while access svn repo

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • svn not prompting while access svn repo

    I have installed svn 1.9.4(apache subversion) in fedora 23 follow this link https://www.if-not-true-then-false.c...-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.





  • #2
    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/s...asedauthz.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/sub...ebdav-protocol) and SVN 2 (https://svn.apache.org/repos/asf/sub...rotocol-v2.txt) webdav protocols and that impacts what is needed for the "Limit" mechanisms.

    Comment


    • #3
      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 <LimitExcept>. 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 <LimitExcept> caused such a blocker. More out of curiosity than because it's important. Thanks again.

      Comment


      • #4
        Glad that it helped! Cheers.

        Comment


        • #5
          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:
          Code:
          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.
          Last edited by palevi; 06-17-2019, 04:57 PM.

          Comment


          • #6
            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.

            Comment


            • #7
              Weird:

              I set SELinux to permissive:

              Code:
              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 ...

              Code:
              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!
              Last edited by palevi; 06-18-2019, 08:39 AM.

              Comment


              • #8
                That's strange. I hope it keeps on working. Cheers.

                Comment

                Working...
                X