duh!  suggestion: add that small fact to your FAQ for nitwits like me :)

ok, so in /etc/suphp.conf I have the following section:

[handlers]
x-httpd-suphp=php:/usr/bin/php-cgi

and in /etc/httpd/conf.d/mod_suphp.conf I have:

LoadModule suphp_module modules/mod_suphp.so
suPHP_Engine on
suPHP_AddHandler x-httpd-suphp
AddHandler x-httpd-suphp .suphp

I then put a script in some directory (/var/www/arix.com/tst.suphp,  
chowned as rpm:rpm)... put it appears that the directory where I place  
it must also be owned by rpm... so I [mkdir /var/www/arix.com/rpm;  
chown rpm:rpm ...] and moved the script there, but the parent  
directory needs to be owned by rpm too...

so I put the following directive in my httpd.conf and moved the script  
there:

<directory /home/rpm>
order allow,deny
allow from all
</directory>

alias /rpm /home/rpm

but then I get: "File "/home/rpm/tst.suphp" is not in document root of  
Vhost "/var/www/arix.com"... ok.  I found and set  
check_vhost_docroot=false within the config file and then I get:  
"Directory "/home/rpm" is writeable by group".  grr... so I create / 
home/rpm/tst and chmod g-w, move the script there but it complains  
about the parent... I found allow_directory_group_writeable and set it  
to true. so now it works.  yikes!

I would really like to just have the script in my /var/www/arix.com  
directory but it and its parents cannot be owned by rpm... I don't see  
a directive to turn that need for ownership.

so what's the typical setup?  where do you guys put things?

(sorry for the lengthy message)

- e

On Sep 16, 2009, at 5:06 PM, Dave D wrote:

> Hi,
>
> To run it as the user RPM chown the file to the rpm user
>
> suPHP runs the PHP script as whoever has ownership on the file.
>
> Regards,
> --Matt
>
>
> On 17/09/2009, at 9:23 AM, Erick Calder wrote:
>
>> hi, I need to execute a command under an account different from that
>> which runs my web server.  perhaps I'm failing to understand what
>> mod_suphp is meant to do but I can't seem to figure out proper usage.
>> this is what I generally would do to execute a shell command:
>>
>> <? echo exec("whoami"); ?>
>>
>> if I wanted it to run under user "rpm", how would I do it?  I've read
>> the docs but am no brighter for them.
>>
>> thx - e
>>
>> _______________________________________________
>> suPHP mailing list
>> [email protected]
>> https://lists.marsching.com/mailman/listinfo/suphp
>


_______________________________________________
suPHP mailing list
[email protected]
https://lists.marsching.com/mailman/listinfo/suphp

Reply via email to