[bf1942] web script
ronaldwdavis at gmail.com
Thu Jul 14 01:41:57 EDT 2005
If i understand this correctly you are asking for a process that apache
kicks off to run a process as a differant user.
As the previous user specified:Paul Bowsher
If you use virtualhosts along with suexec you can control all scripts being
executed on a site to be ran as any user you want. Further if you look at
the subproces that is spawned from apache you can see if running as that
To do this first you have to compile apache with suexec support.
to tell you if it is enabled.
Once you do that in httpd.conf you tell the system what user to execute a
script as and where they may execute scripts from.
Also you could always shell out of the script and run the "su user -c "/bf2
stop| start" way as well.
Hope that helps
On 7/14/05, ScratchMonkey <ScratchMonkey at matureasskickers.net> wrote:
> --On Wednesday, July 13, 2005 7:31 PM -0500 Tim Cooper
> <tim at myinternetservices.com> wrote:
> > I have a web app that executes this and another to kill the screen. The
> > problem I am having is that the users "apache" executes this and not the
> > user I need it to be
> "man sudo"
> In my /etc/sudoers I have this line:
> apache ALL = (root) NOPASSWD: /sbin/service bf2*
> This says that user apache can issue the command "/sbin/service bf2*" (the
> "*" is a wildcard to indicate that anything can follow that on the line).
> The command will run as root and no password will be prompted for. The
> apache must issue the command exactly as specified:
> sudo /sbin/service bf2 start
> sudo /sbin/service bf2 stop
> I think what you want is the same but with root replaced by whatever user
> runs the game server. You can use an alias there and then define the alias
> earlier in the file as the list of game server users.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Bf1942