Eric | 11 Nov 18:59

"Can't check path..."


Good afternoon...

New Chora user and fairly new Horde user... Horde is version 3.1.3 and 
Chora is version 2.0.1.  I am using it exclusively with Subversion 
repositories.

I searched the mailing list archives for a solution to my problem and was 
not able to find one.  There was a question on the topic from another user 
but I could not find an answer.

I installed and configured Chora per config/INSTALL, and set it up as the 
Horde admin user.

Now when I start it up as a regular user, the first thing I get is:

     svn: Can't check path '/root/.subversion': Permission denied

Chora is supposed to run as the apache user (right?), so how come it's 
looking for things in /root?

Eric

--

-- 
Chora mailing list - Join the hunt: http://horde.org/bounties/#chora
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: chora-unsubscribe <at> lists.horde.org

Jan Schneider | 12 Nov 11:34
Favicon
Gravatar

Re: "Can't check path..."

Zitat von Eric <spamsink <at> scoot.netis.com>:

>
> Good afternoon...
>
> New Chora user and fairly new Horde user... Horde is version 3.1.3  
> and Chora is version 2.0.1.  I am using it exclusively with  
> Subversion repositories.
>
> I searched the mailing list archives for a solution to my problem  
> and was not able to find one.  There was a question on the topic  
> from another user but I could not find an answer.
>
> I installed and configured Chora per config/INSTALL, and set it up  
> as the Horde admin user.
>
> Now when I start it up as a regular user, the first thing I get is:
>
>     svn: Can't check path '/root/.subversion': Permission denied
>
> Chora is supposed to run as the apache user (right?), so how come  
> it's looking for things in /root?

Yes, but check your Apache's environment variables, they still point to root.

Jan.

--

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/
(Continue reading)

Eric | 12 Nov 15:07

Re: "Can't check path..."

At 05:34 AM 11/12/2006, Jan Schneider wrote:

 >> Yes, but check your Apache's environment variables, they still point to 
root.

Good morning, Jan.

Hmmm ... the only thing in apache's environment list that points to root is:

     XAUTHORITY=/root/.xautheoLZWg

Is that what's doing it to me?

Should I change XAUTHORITY to point somewhere else (who knows what else 
that will screw up?), or should I open up the /root/.subversion directory 
so it's visible by the apache user?

I can try the latter easily enough (just make it world writeable) but would 
that open up any security holes?

--

-- 
Chora mailing list - Join the hunt: http://horde.org/bounties/#chora
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: chora-unsubscribe <at> lists.horde.org

Eric | 12 Nov 15:38

Re: "Can't check path..."

At 09:07 AM 11/12/2006, Eric wrote:

 >Hmmm ... the only thing in apache's environment list that points to root is:
 >
 >     XAUTHORITY=/root/.xautheoLZWg

Actually, I was looking on the wrong machine.  The machine I'm using 
doesn't even have that environment variable pointing to root, for the 
apache user.

In any case, I tried setting the /root/.subversion directory and its 
contents to world readable and writeable, but that didn't do any good... 
still getting:

     svn: Can't check path '/root/.subversion': Permission denied

... when I do the initial callup of "Version Control" from under the Horde 
"Development" menu item (doing this as the admin user).

Note that there isn't necessarily always a .subversion directory for root, 
if the root user never uses subversion (and why would anyone use subversion 
as the root user, especially on a publicly visible machine?).

--

-- 
Chora mailing list - Join the hunt: http://horde.org/bounties/#chora
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: chora-unsubscribe <at> lists.horde.org

Eric | 12 Nov 16:44

Followup (Re: "Can't check path...")


Attempting to do a little debug work on the "svn: Can't check path 
'/root/.subversion': Permission denied" error message I'm getting on 
initial Chora startup after configuration.

I don't know anything about PHP but the code doesn't look all that 
different from C++ so it's not completely impossible to follow... :-)

I've gotten as far as the second call to checkError( ) in browse.php, at 
line 23 (using the source for Chora version 2.0.1).  That one errors out at 
line 238 in lib/Chora.php

   /**
    * Given a return object from a VC:: call, make sure
    * that it's not a PEAR_Error object.
    *
    * @param mixed $e  Return object from a VC:: call.
    */
   function checkError($e)
   {
       if (is_a($e, 'PEAR_Error')) {
           Chora::fatal($e->getMessage());  // << errors out here
       }
   }

So, apparently $dir->browseDir($cache, true, $atticFlags) returns some kind 
of a pear error object that is interpreted as "'/root/.subversion': 
Permission denied".

I'm not getting these kinds of errors in any of the other horde 
(Continue reading)

Chuck Hagenbuch | 12 Nov 17:49
Favicon
Gravatar

Re: "Can't check path..."

Quoting Eric <spamsink <at> scoot.netis.com>:

> Actually, I was looking on the wrong machine.  The machine I'm using  
> doesn't even have that environment variable pointing to root, for  
> the apache user.

Does the apache user even have a home directory, though? And if so,  
does it have permissions to write to it?

> In any case, I tried setting the /root/.subversion directory and its  
> contents to world readable and writeable, but that didn't do any  
> good... still getting:

Probably the apache user doesn't have read/execute permissions on  
/root (which is a good thing, really) so it can't get to the  
.subversion dir.

What are you using for 'location' in sourceroots.php for the svn  
source? (sorry if I missed this earlier in the thread)

-chuck

-- 
"we are plastered to the windshield of the bus that is time." - Chris
--

-- 
Chora mailing list - Join the hunt: http://horde.org/bounties/#chora
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: chora-unsubscribe <at> lists.horde.org

(Continue reading)

Chuck Hagenbuch | 12 Nov 17:59
Favicon
Gravatar

Re: Followup (Re: "Can't check path...")

Quoting Eric <spamsink <at> scoot.netis.com>:

> So, apparently $dir->browseDir($cache, true, $atticFlags) returns  
> some kind of a pear error object that is interpreted as  
> "'/root/.subversion': Permission denied".
>
> I'm not getting these kinds of errors in any of the other horde  
> applications I'm running (turba, nag, passwd.  I'm hoping that means  
> there's a good chance that the pear installation is OK (in any case,  
> it was there when I started working with the horde apps and I  
> haven't changed anything).

Right; PEAR_Error is kind of like exceptions for PHP 4 (which didn't  
have exceptions). It's not a problem with the PEAR install, it's an  
error being returned from the VC functions - in this case browseDir,  
which is trying to list the files in the top level of the repository.

> The error indicates a return from a VC:: call, and the only one of  
> those prior to here in the code is $VC->queryDir($where) in  
> browse.php line 20.  How do I find out the return types of things  
> like $VC->queryDir() and what is the best way to display them for  
> debugging?

Look in your Horde framework dir - framework/VC/VC.php, or  
framework/VC/VC/svn.php (or libs/VC/svn.php depending on what  
framework setup you have).

> ... will display "Hello, World") in an error box on the browser, but  
> execution then stops and anyway, I haven't figured out how to  
> display variables as in the C printf() or C++ cout.
(Continue reading)

Jan Schneider | 12 Nov 18:21
Favicon
Gravatar

Re: "Can't check path..."

Zitat von Eric <spamsink <at> scoot.netis.com>:

> At 09:07 AM 11/12/2006, Eric wrote:
>
>> Hmmm ... the only thing in apache's environment list that points to root is:
>>
>>     XAUTHORITY=/root/.xautheoLZWg
>
> Actually, I was looking on the wrong machine.  The machine I'm using  
> doesn't even have that environment variable pointing to root, for  
> the apache user.

Well, *my* apache has the HOME and USER environment set to /root and  
root by default even though it's not running as root of course.

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/

--

-- 
Chora mailing list - Join the hunt: http://horde.org/bounties/#chora
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: chora-unsubscribe <at> lists.horde.org

Eric | 12 Nov 18:16

Re: "Can't check path..."

At 11:49 AM 11/12/2006, Chuck Hagenbuch wrote:

<CH>>>>>Does the apache user even have a home directory, though? And if 
so,  does it have permissions to write to it?<<<<<

Good afternoon, Chuck.

The normal apache home directory, at least on Fedora, is /var/www.  The 
apache user didn't have write access to that directory up to now, but I 
just made that directory owned by the apache group and group readable and 
writeable.  Didn't do any good.

<CH>>>>>Probably the apache user doesn't have read/execute permissions on 
/root (which is a good thing, really) so it can't get to the .subversion 
dir.<<<<<

So it seems.  I tried making root world readable and writeable and that 
fixed the problem (obviously, though, I had to immediately go back and take 
away those privileges to the root directory and naturally the problem came 
back).

To digress for just a moment... When I made the root directory world 
accessible and restarted chora, I got a different error message:

     svn: '/usr/local/svnroot/repos/MyRepo' is not a working copy

I thought the "location" in sourceroots.php was supposed to point to the 
repository, not to a working copy.

But, as I said, I digress... and anyway I need to fix the access problem 
(Continue reading)

Chuck Hagenbuch | 12 Nov 18:27
Favicon
Gravatar

Re: "Can't check path..."

Quoting Eric <spamsink <at> scoot.netis.com>:

> <CH>>>>>What are you using for 'location' in sourceroots.php for the  
> svn source?<<<<<
>
> /usr/local/svnroot/repos/MyRepo
>
> It is a legal Subversion repository, is owned by the svn group, and  
> that directory and everything under it is group readable and  
> writeable.  I have added the apache user to the svn group.

Please try file:///usr/local/svnroot/repos/MyRepo

-chuck

-- 
"we are plastered to the windshield of the bus that is time." - Chris
--

-- 
Chora mailing list - Join the hunt: http://horde.org/bounties/#chora
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: chora-unsubscribe <at> lists.horde.org


Gmane