Re: Execute permission question
| From: | Tedd Sperling | Date: | Fri, 28 Oct 2011 15:25:06 +0000 |
| Subject: | Re: Execute permission question | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-315496@lists.php.net to get a copy of this message | ||
On Oct 28, 2011, at 11:07 AM, Daniel Brown wrote:
> 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>
Mucho thanks for the clarification, information, and authorization.
I'll keep that in mind re php1.net and try not to be a teddzilla when I investigate shell
commands. :-)
Cheers,
tedd
PS: I have not trimmed the post because I think it is important to repeat this.
____________________
tedd@sperling.com
http://sperling.com