Dynadot Aftermarket: discover domain gems worth investing in. Visit our aftermarket.

Is allowing exec() function safe?

SpaceshipSpaceship
SpaceshipSpaceship
SpaceshipSpaceship
Watch

cancer10in

Established Member
Impact
0
Hello Webhosters!


Do you think its safe to allow the PHP function exec() on a shared server?

If yes, why?

If No, why?


Plz explain.


Thanx in advance
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
It is not safe. The reason is it will allow to execute commands. If some vulnerable commands are executed it will cause security issues.
 
0
Close
How do you diasllow system functions (like exec() system() etc ) in php.ini?
 
0
Close
cancer10in said:
Do you think its safe to allow the PHP function exec() on a shared server?

You'll need to think about what you mean by "safe" to get a sensible answer. Disallowing exec may restrict your hosting customers. Allowing exec may allow vulnerabilities to be exploited. Any hosting provider needs to strike a balance between the two.

IMO allowing exec in itself is not unsafe. If you allow cgi-bin scripts, then allowing exec is pretty much the same thing (there is no way to prevent a perl script from doing the same thing as PHP exec). You should depend on other security measures (such as file permissions) to prevent access of sensitive information (e.g. other users' home directories) on the server. I always configure PHP and cgi in su mode on shared servers, so allowing PHP exec is not a problem.
 
0
Close
qbert220 said:
I always configure PHP and cgi in su mode on shared servers, so allowing PHP exec is not a problem.


How do I do that on my server?
 
0
Close
0
Close
You need to involve additional measures to protect the server and you will need to be sure about all people hosted there
 
0
Close
DomainEasy: white label portfolios are live. Enable yours.

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Switch between accounts
You can now stay logged in to more than one NamePros account in the same browser. Click your avatar, then "Accounts in this browser", to...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back