+ Post New Thread
Page 2 of 2 FirstFirst 12
Results 16 to 25 of 25
*nix Thread, Subversion & WHM/Cpanel 11 in Technical; I also have the same issue with the permissions....
  1. #16

    Join Date
    Aug 2011
    Posts
    3
    Thank Post
    2
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    I also have the same issue with the permissions.

  2. #17

    Join Date
    Aug 2011
    Posts
    3
    Thank Post
    2
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    To fix the permissions: the folder and files need to be for useraccount:useraccount if you are using suPHP.

    You then also have to add to your config file located at /usr/local/apache/conf/userdata/std/2/cpanl_user/domain.com/file.conf
    # added for permissions/access
    Order allow,deny
    Allow from all
    The complete conf file should look like this:
    <Location /svn>
    # mod dav svn support and location of svn repo files
    DAV svn
    SVNPath /path/to/svn/repos
    # authentication for security, create using htpasswd
    AuthType Basic
    AuthName "SVN Access"
    AuthUserFile /path/to/file/containing/user.pass
    Require valid-user
    # added for permissions/access
    Order allow,deny
    Allow from all
    </Location>

  3. #18
    contink's Avatar
    Join Date
    Jul 2006
    Location
    South Yorkshire
    Posts
    3,791
    Thank Post
    303
    Thanked 327 Times in 233 Posts
    Rep Power
    118
    Latest has a significant update due to the way dependencies are now handled.

    Apache 2.2.19
    Subversion 1.7.1

    Code:
    cd /home/downloads/svn
    wget http://subversion.tigris.org/downloads/subversion-1.7.1.tar.gz
    tar xfvz subversion-1.7.1.tar.gz
    cd subversion-1.7.1
    sh get-deps.sh
    cd neon
    ./configure --prefix=/usr/local/neon
    make
    make install
    cd ..
    ./configure --with-apxs=/usr/local/apache/bin/apxs --with-apr=/usr/local/apache/bin/apr-1-config --with-apr-util=/home/cpeasyapache/src/httpd-2.2.19/srclib/apr-util --with-neon=/usr/local/neon/ --with-ssl
    make
    make install

  4. Thanks to contink from:

    Louisvdw (4th November 2011)

  5. #19
    contink's Avatar
    Join Date
    Jul 2006
    Location
    South Yorkshire
    Posts
    3,791
    Thank Post
    303
    Thanked 327 Times in 233 Posts
    Rep Power
    118
    That time again...

    Apache 2.2.22
    Subversion 1.7.5

    Code:
    cd /home/downloads/svn
    wget http://subversion.tigris.org/downloads/subversion-1.7.5.tar.gz
    tar xfvz subversion-1.7.5.tar.gz
    cd subversion-1.7.5
    sh get-deps.sh
    cd neon
    ./configure --prefix=/usr/local/neon
    make
    make install
    cd ..
    ./configure --with-apxs=/usr/local/apache/bin/apxs --with-apr=/usr/local/apache/bin/apr-1-config --with-apr-util=/home/cpeasyapache/src/httpd-2.2.22/srclib/apr-util --with-neon=/usr/local/neon/ --with-ssl
    make
    make install

  6. Thanks to contink from:

    Louisvdw (31st May 2012)

  7. #20
    contink's Avatar
    Join Date
    Jul 2006
    Location
    South Yorkshire
    Posts
    3,791
    Thank Post
    303
    Thanked 327 Times in 233 Posts
    Rep Power
    118
    Small nugget...

    If your Apache version and Subversion version are still the same but you want to update say PHP to in Cpanel.. .

    1. Ensure you have disabled the include editor LoadModule lines (as per earlier posts) & restarted Apache.
    2. Use EasyApache as normal and ensure you are indeed leaving your apache version alone during the update
    3. Run this code:
      Code:
      cd /home/downloads/svn/subversion-1.7.5
      make
      make install
    4. Re-enable the LoadModule lines
    5. Restart Apache

  8. #21
    contink's Avatar
    Join Date
    Jul 2006
    Location
    South Yorkshire
    Posts
    3,791
    Thank Post
    303
    Thanked 327 Times in 233 Posts
    Rep Power
    118
    Recently upgraded but came up against a few things regarding mod_security so see below if you get something similar.

    Apache 2.2.24
    Subversion 1.7.9

    Code:
    cd /home/downloads/svn
    wget http://subversion.tigris.org/downloads/subversion-1.7.9.tar.gz
    tar xfvz subversion-1.7.9.tar.gz
    cd subversion-1.7.9
    sh get-deps.sh
    cd neon
    ./configure --prefix=/usr/local/neon
    make
    make install
    cd ..
    ./configure --with-apxs=/usr/local/apache/bin/apxs --with-apr=/usr/local/apache/bin/apr-1-config --with-apr-util=/home/cpeasyapache/src/httpd-2.2.24/srclib/apr-util --with-neon=/usr/local/neon/ --with-ssl
    make
    make install

    The Mod_Security quirk was down to the rules I had in a custom.conf for apache...
    Code:
    <IfModule mod_dav_svn.c>
      <Location /_dev>
        DAV svn
        SVNParentPath /home/foo/svn/dev
    
        # Our ACL (Access Control Policy)
        AuthzSVNAccessFile /home/foo/svn/svnaccess
    
        # Try anonymous access first, then usernames if required.
        Satisfy Any
        Require valid-user
    
        AuthType Basic
        AuthName "My Dev Repos"
        AuthUserFile /home/foo/svn/passwd
    
        <IfModule mod_security2.c>
    
            # Blanket approach (disable if possible)
            #SecRuleEngine Off
    
            # SubVersion Rules to allow through
            #SecRule REQUEST_METHOD "^(PROPFIND|PROPPATCH)$" allow "id:1234123456"
            #SecRule REQUEST_METHOD "^(REPORT|OPTIONS)$" "id:1234123457,allow"
            #SecRule REQUEST_METHOD "^(MKACTIVITY|CHECKOUT)$" "id:1234123458,allow"
            #SecRule REQUEST_METHOD "^(PUT|DELETE|MERGE)$" "id:1234123459,allow"
            #SecRule REQUEST_METHOD "^(MKCOL)$" allow "id:1234123460,allow"
    
        </IfModule>
    
      </Location>
    </IfModule>
    Now the code above is now disabled because it seems Mod_Security has included a subversion exception/rule as standard now but the code above caused me some problems because of two things:

    1. Mod_security now requires a unique_id for each rule, which CPanel appears to have helpfully applied to each of my custom rules...
    2. The syntax has changed from the pre Mod_Sec 2.7 type:
    Code:
    SecRule REQUEST_METHOD "^(PROPFIND|PROPPATCH)$" allow
    ..to this:
    Code:
    SecRule REQUEST_METHOD "^(PROPFIND|PROPPATCH)$" "id:1234123456,allow"
    As you can see in my example above I've disabled the workaround as it doesn't appear to be required anymore but it might catch you out if you've been getting errors like this:
    SecRule takes two or three arguments, rule target, operator and optional action list

  9. #22
    contink's Avatar
    Join Date
    Jul 2006
    Location
    South Yorkshire
    Posts
    3,791
    Thank Post
    303
    Thanked 327 Times in 233 Posts
    Rep Power
    118
    Post deleted at request of poster
    Last edited by elsiegee40; 20th January 2014 at 06:54 AM.

  10. #23

    Join Date
    Nov 2013
    Posts
    1
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    SVN Install

    Hi
    Many Thanks for the guidance.
    I have
    Apache 2.2.25
    Subversion 1.8.4
    PHP Version 5.3.27

    I am trying to setup SVn on my server and bit confused of the order. Please correct me if the following order is wrong.


    cd /home/downloads/svn
    wget http://subversion.tigris.org/downloa...n-1.8.4.tar.gz
    tar xfvz subversion-1.8.4.tar.gz
    cd subversion-1.8.4
    sh get-deps.sh (I cannot see this script)
    cd serf
    ./serfmake --prefix=/usr/local/serf --with-apr=/usr/local/apache/bin install
    make
    make install
    cd ..
    ./configure --with-apxs=/usr/local/apache/bin/apxs --with-apr=/usr/local/apache/bin/apr-1-config --with-apr-util=/home/cpeasyapache/src/httpd-2.2/srclib/apr-util --with-serf=/usr/local/serf/
    make
    make install


    Create the svn_custom.conf using the new EA3 feature as described here:
    cPanel - The Easy Apache Configuration System - Adding Custom Directives to httpd.conf
    /etc/httpd/conf/userdata/std/2/[username]/[subdomain?].[domain]

    eg: /etc/httpd/conf/userdata/std/2/contink/www.continuousink.info
    .. the www is required or can be any subdomain but note the exception to wildcard sub-domains in the reference above.
    <IfModule mod_dav_svn.c>
    <Location /[repos-folder]>
    DAV svn
    SVNPath /home/[username]/svn/[repos-name]
    AuthType Basic
    AuthName "[Repository Label]"
    AuthUserFile /home/[username]/svn/passwd
    Require valid-user
    </Location>
    </IfModule>
    The <IfModule.. > call helps avoid your apache falling over if there's a problem with the conf file so don't get rid of it!

    TEST the custom configuration before you commit it!
    /scripts/verify_vhost_includes

    Assuming all is well... commit the svn_custom.conf and restart the apache server:

    /scripts/ensure_vhost_includes --user=[username]

    /scripts/rebuildhttpdconf
    /scripts/restartsrv_httpd


    In WHM go to:

    1. Main >> Service Configuration >> Apache Configuration
    2. In the "Pre Main Include" select your current version
    3. Replace:

    Code:
    LoadModule dav_svn_module modules/mod_dav_svn.so
    LoadModule authz_svn_module modules/mod_authz_svn.so
    with:
    Code:
    # LoadModule dav_svn_module modules/mod_dav_svn.so
    # LoadModule authz_svn_module modules/mod_authz_svn.so
    (This disables the subversion repository)


    You can now recompile Apache successfully (remember to select "Dav" as one of the modules to include).

    Is this order right?
    Last edited by milindras; 11th November 2013 at 12:31 PM.

  11. #24
    contink's Avatar
    Join Date
    Jul 2006
    Location
    South Yorkshire
    Posts
    3,791
    Thank Post
    303
    Thanked 327 Times in 233 Posts
    Rep Power
    118
    Apache 2.2.26
    Subversion 1.8.5

    Code:
    cd /home/downloads/svn
    wget http://subversion.tigris.org/downloads/subversion-1.8.5.tar.gz
    tar xfvz subversion-1.8.5.tar.gz
    cd subversion-1.8.5
    sh get-deps.sh
    cd serf
    ./serfmake --prefix=/usr/local/serf --with-apr=/usr/local/apache/bin install
    cd ..
    ./configure --with-apxs=/usr/local/apache/bin/apxs --with-apr=/usr/local/apache/bin/apr-1-config --with-apr-util=/home/cpeasyapache/src/httpd-2.2/srclib/apr-util --with-serf=/usr/local/serf/
    make clean
    make
    make install
    It also seems that because the modules are now being built in a new location you need to alter the apache pre-main config as well

    Instead of:
    Code:
    LoadModule dav_svn_module modules/mod_dav_svn.so
    LoadModule authz_svn_module modules/mod_authz_svn.so
    You will now need to use:
    Code:
    LoadModule dav_svn_module /usr/local/libexec/mod_dav_svn.so
    LoadModule authz_svn_module /usr/local/libexec/mod_authz_svn.so

  12. #25
    contink's Avatar
    Join Date
    Jul 2006
    Location
    South Yorkshire
    Posts
    3,791
    Thank Post
    303
    Thanked 327 Times in 233 Posts
    Rep Power
    118
    Right... Having spent the last 4 [expletive] hours trying to nail this down here's a few tips on how to deal with the 1.8.x update that may trip you up.

    1. Make sure you know where your apache error_log is and tail it if you hit problems.
    Code:
    tail -f /usr/local/apache/logs/error_log
    In particular watch out for 403 forbidden errors that weren't a problem with Subversion 1.7 but appeared as soon as you upgraded your svn server or client to 1.8 or higher.

    In my case the problem was a problem with a file system path in one of my AuthzSVNAccessFile settings. It completely borked the entire authentication file without giving any indication to the client. It'll appear as something like:
    Failed to load the mod_authz_svn config: Section name 'repository_name' contains non-canonical fspath 'repository_name'
    2. Look out for problems from mod_security coming in all over again
    Code:
    <IfModule mod_dav_svn.c>
      <Location /_dev>
        DAV svn
        SVNParentPath "/home/foo/svn/dev"
    
        # Our ACL (Access Control Policy)
        AuthzSVNAccessFile /home/foo/svn/svnaccess
    
        # Try anonymous access first, then usernames if required.
        Satisfy Any
        Require valid-user
    
        AuthType Basic
        AuthName "My Dev Repos"
        AuthUserFile /home/foo/svn/passwd
    
        <IfModule mod_security2.c>
    
            # Blanket approach (disable if possible)
            #SecRuleEngine Off
    
            # SubVersion Rules to disable to allow commits
            SecRuleRemoveById 390616
    
        </IfModule>
    
      </Location>
    </IfModule>

    3. If you're installing Nginx as a way of boosting your servers speed for static files then you'll need to make some changes to allow apache to handle your svn access or you'll hit more forbidden error problems:

    Once installed:
    Code:
    cd /etc/nginx/vhosts
    pico www.yourdomain.com
    FIND:
    Code:
    root /home/foo/public_html;
    AFTER, ADD:
    Code:
    location [your repos as per your apache custom.conf] {
    proxy_pass http://[your_ip:proxy_port];
    include proxy.inc;
    include microcache.inc;
    }
    For the above, refer to the other blocks of code in the nginx conf file to see what you should be putting in each...
    Last edited by contink; 30th January 2014 at 10:56 PM.

SHARE:
+ Post New Thread
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Tip:: WHM transfer : files get written blank?
    By contink in forum Web Development
    Replies: 0
    Last Post: 24th September 2008, 09:59 PM
  2. Subversion
    By Jackd in forum Coding
    Replies: 4
    Last Post: 18th August 2008, 11:47 AM
  3. Replies: 6
    Last Post: 7th April 2008, 07:10 PM
  4. Cpanel 11 - spam assassin & memory
    By contink in forum *nix
    Replies: 6
    Last Post: 22nd September 2007, 11:58 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •