You are not logged in.

#1 2006-10-18 19:51:21

lz3060
Member
Registered: 2006-09-15
Posts: 35

[fixed], but issues with Apache's environment remain

Hi,

I am writing a script that parses the output of 'svn log' in php. The script works flawlessly on Gentoo and Redhat (a box at home and the dev server at work), and worked on my laptop (Arch) yesterday. However, with today's revision, I get a permission denied error for a file that svn should never attempt to read in the first place.

This is how I execute svn:

$cmd = "/usr/bin/svn log --non-interactive --verbose (...credentias and URL...)";
// I am accessing a remote repo via http with --username and --password
exec($cmd, $output, $returned);

And this is what I get in $output:

svn: Can't open file '/root/.subversion/servers': Permission denied

Why does this happen?

Offline

#2 2006-10-18 22:13:01

lz3060
Member
Registered: 2006-09-15
Posts: 35

Re: [fixed], but issues with Apache's environment remain

The init script for httpd does not clear the ENV variables -- thus, starting Apache with

sudo /etc/rc.d/httpd start

makes all user environment variables available to the server. When svn is executed from within php, it finds that $HOME is set and pointing to /root/ ... no need to say more.

I looked at the init scripts of Arch, and those of a couple of other distros ...  no other distro leaves the entire environment untouched.

I realize that Arch is all about simplicity, and customizations are left for the user to implement. Still, isn't this one of these small things that are better not left for the regular user?

Call me a newbie (which I am), but I'd prefer to have apache started in a clean environment (probably only PATH needs to be preserved).

What do you all think?

Offline

Board footer

Powered by FluxBB