FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Exec Security
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Exec Security [message #178990 is a reply to message #178988] Sat, 01 September 2012 02:12 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 8/31/2012 9:49 PM, Ryan wrote:
> I am working on a PHP script that will create Nginx vhosts. Creating the files should be simple enough. The hard part is this command "service nginx reload" to load the new vhost config.
>
> The result is I have to use Exec() to run the command. The bad problem I host sites for clients on the server, they obviously should not have access to Exec().
>
> Is there anything I can do to allow me to use it but prevent my other users?
>

I'm not at all familiar with Nginx, so I'll phrase this in Apache terms
and maybe you can get the idea.

To PHP, there's no difference between users if you're running PHP as a
module. If you're running it as a CGI, you have more flexibility and
should be able to specify a different php.ini file for each site (I
haven't actually tried that, though).

You should also be able exec() in your <Virtual Host> entry for each
host except yourself, but again I haven't tried this.

Maybe the easiest way to do this is to run a private server (one which
requires a login to do anything) on a different port and use your own
php.ini in that server.



--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Is PDO an abstraction layer?
Next Topic: Net Connect API -php
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 22 12:59:29 GMT 2024

Total time taken to generate the page: 0.05262 seconds