Re: Re: [RFC][DISCUSSION] script() and script_once()
| From: | Yasuo Ohgaki | Date: | Fri, 06 Feb 2015 04:35:11 +0000 |
| Subject: | Re: Re: [RFC][DISCUSSION] script() and script_once() | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-82011@lists.php.net to get a copy of this message | ||
Hi Pierre,
On Fri, Feb 6, 2015 at 1:16 PM, Pierre Joye <pierre.php@gmail.com> wrote:
> > With SElinux, we can restrict access. However, PHP should be able to
> > read/write
> > uploaded files. PHP just read and execute them with include.
>
> Again, I am talking about executing files. You can exclude a file,
> path, folder for being invoked with a handler or similar things on a
> web server. It has nothing to do with the PHP ability to access this
> file as normal data. That won't prevent a file_get_contents+eval but
> you get the idea.
>
OK.
>
> > Is windows possible to prevent PHP to load script and execute? While
> > allowing write/read access?
>
> Yes and no. It is a web server role. Linux allows access restrictions
> too, windows only provides a much more fine grained ACL. But again, it
> is not what I am referring to.
>
>
> > I have similar idea for PHP to have data only dirs.
>
> We have that already, not for php, but for web servers. This is their
> job to deal with that.
Yes, indeed.
engine=off
per dirs. This is what I suggest people. It cannot prevent other dir's
PHP scripts to load & execute. Public upload dir must have this setting.
My idea is controlling it from PHP, not as web server management.
It's better than per dir "engine=off".
It's not too important for me now, so it's not my priority.
Regards,
--
Yasuo Ohgaki
yohgaki@ohgaki.net