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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
Thanks for pointing this out!
Marijn
I have resolved this question by your suggestion ,which puzzled me nearly a week.