Page 1 of 1

Apache, suPHP, common code library?

Posted: Sat Jul 16, 2005 2:29 pm
by miscreant
OK, I can't seem to get any answer to this on apache forums, so maybe the php gurus will know the answer to this.

The scenario I have is that I'm running apache2 with suPHP. I have 2 virtual hosts set up currently, one under a user account we'll call fred and the default virtual host. Fred's virtual host is running with the credentials fred:fred and the default virtual host is running with the credentials apache:apache. The apache server itself is actually running under a third set of credentials www-data:www-data.

Now, when running code under fred's public_html directory (via his virtual host) it runs with his credentials. What I want to be able to do though is have a repository of common code under the default virtual host that I can just link to so that I only have to keep one code-base up to date for the common programs I write. Currently I can link to it and run the code, but apache switches users when I do to run under the credentials of the default virtual host (apache:apache) which means any code that tries to open/create/upload files to the user's public_html directory tree fail.

So does anyone know WHY apache is switching users on symbolic links? Is there anyway to prevent it, or to make it just switch the user's group. The user is in the apache group and that group has read access to all the common code.

Thanks in advance,
miscreant

Solved

Posted: Tue Jul 19, 2005 10:22 pm
by miscreant
OK, figured this one out. Posted what I had wrong here:

http://www.apachefreaks.com/forums/inde ... entry13906

Now to work on getting mysql up and running! Hopefully will be less trouble.

miscreant