Menu

Access premission problem (/root/.subversion)

Help
2006-05-11
2013-05-01
  • Michael Fursov

    Michael Fursov - 2006-05-11

    Hi,

    i'm running SVNManager with CentOS 4.3. Apache running as user 'apache'. svnmanager creates empty repository folders and '/root/.subversion permission denied'.

    Suppose my unix username is bob.
    I su to root.
    I then use "httpd start" to launch apache.
    I logout from root.
    Apache now runs as 'apache', and the "USER" environment is set to "bob".

    However, the "HOME" variable is (incorrectly) set to "/root".

    When PHP calls the svn function, it seems that it picks up the HOME
    variable. SVN must probably look for it's preferences inside
    ~/.subversion, ~ being the HOME variable (/root). Since it runs as
    www, it fails and spits out a permission error. I am not sure if the
    USER variable changes something in this.

    There is actually a way to do this, using the --config-dir switch on
    the svn command.

    in Config.php:
    $svn_config_dir = "/tmp"
    $svnadmin_cmd = "/usr/local/bin/svnadmin --config-dir /tmp"; -> svnmanager creates normal repository folders

    in GroupPrivilegesEditPage.php and UserPrivilegesEditPage.php:
    @@ -240,1 +240,1
    -- $switches = array();
    ++ $switches = array('config_dir' => $svn_config_dir);

    voila.. problem solved.

    MFG
    Michael

     
    • Marijn Verkerk

      Marijn Verkerk - 2006-05-11

      Thanks for pointing this out!

      Marijn

       
    • qinquan

      qinquan - 2007-05-28

      I have resolved this question by your suggestion ,which puzzled me nearly a week.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.