i try to config apache & php for my project to create web-based for file config management to open vpn in bsd unix, but i can't run as superuser to start or stop service
+1
A:
you can use a script with a setuid to do the actual command.
ie some bash script like this would do it
#!/bin/sh
/etc/init.d/openvpn $1
you shoud chmod +s yourscript.sh
and use a system('yourscript.sh start')
in PHP.
Note: You have to be really careful with that because it could make big security holes
RageZ
2009-11-11 05:58:19
thank you , ragez
vernomcrp
2009-11-11 06:23:16
but i using mod_suexec (apache server) and FastCGI(php), I don't know how to config and test if its work, can u give any resource about that,:)
vernomcrp
2009-11-11 06:25:17
it will work with anything on *nix. just give it a try
RageZ
2009-11-11 06:47:13
A:
Do you have sudo access on the machine? That is, can you prefix your start/stop commands with "sudo" to run them as a superuser?
If not, I think you're out of luck. But there's almost no information here to work with.
Funkatron
2009-11-11 05:58:22