You could launch a shell which has those variables --- //Alex
On Thu, Sep 17, 2009 at 9:59 AM, Erick Calder <[email protected]> wrote: > one other question: when I run my script, $HOME isn't defined... this > means that rpm cannot find ~/.rpmmacros and stuff breaks. I gather I > can just define it when I system() my commands but how come it's not > there? > > On Sep 16, 2009, at 10:38 PM, Andre Schild wrote: > >> Hello Eric, >> >> this depends with what options you did compile the suPHP. >> >> --with-setid-mode=MODE >> >> There are 3 possibilities: >> >> "owner": Run scripts with owner UID/GID, so your .php script must >> be >> owned by "rpm" >> >> "force": Run scripts with UID/GID specified in Apache >> configuration, >> not recommended. >> >> "paranoid": Same as "owner", but you have to also specify the >> "allowed" >> users/groups in the Apache configuration >> >> So you .php script has to be owned by "rpm" AND in the apache >> config you have to specify >> >> suPHP_UserGroup rpm andrpmgroup >> >> >> >> Todays "paranoid" is recommended. >> >> >> André >> >> >>>> -----Original Message----- >>>> From: Erick Calder [mailto:[email protected]] >>>> Sent: Thursday, September 17, 2009 1:24 AM >>>> To: [email protected] >>>> Subject: [suPHP] how to execute a command? >>>> >>>> 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 > > > _______________________________________________ > suPHP mailing list > [email protected] > https://lists.marsching.com/mailman/listinfo/suphp > _______________________________________________ suPHP mailing list [email protected] https://lists.marsching.com/mailman/listinfo/suphp
