Re: Execute permission question
| From: | Daniel Brown | Date: | Fri, 28 Oct 2011 15:07:00 +0000 |
| Subject: | Re: Execute permission question | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-315494@lists.php.net to get a copy of this message | ||
On Fri, Oct 28, 2011 at 11:01, Tedd Sperling <tedd.sperling@gmail.com> wrote:
>
> But does having execute permissions set on a script affect the scripts ability to run shell
> commands?
Negative. It won't inherit permissions, though one might expect
that to make sense.
> For example, if I have a script that contains a shell command, can I prohibit that script from
> executing the command by setting it's execute permission to not execute?
No, the best you could do is disable all shell access, or limit
the commands that can be run via the shell, but the latter option is
getting beyond the scope of a PHP question.
> Certainly, as is my normal custom, I could try it and find out for myself -- but I have always
> been reluctant to use shell commands. Besides, never having used them, I don't see their
> advantage yet. Currently, they seem strange and dangerous to me.
If you're doing it on php1.net, you're safe. The only damage that
can happen on that server is to your own account. That's
unfortunately not true of all hosting providers, but you're good
there. ;-P
--
</Daniel P. Brown>
Network Infrastructure Manager
http://www.php.net/