Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82011 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60336 invoked from network); 6 Feb 2015 04:35:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Feb 2015 04:35:55 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.54 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.216.54 mail-qa0-f54.google.com Received: from [209.85.216.54] ([209.85.216.54:60292] helo=mail-qa0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FE/43-45146-AA444D45 for ; Thu, 05 Feb 2015 23:35:55 -0500 Received: by mail-qa0-f54.google.com with SMTP id w8so9215993qac.13 for ; Thu, 05 Feb 2015 20:35:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=HQODnV0+erW1b/FeOjQURCJe80wMW39VCKhbjzTgWGs=; b=UhWDzCj1cjZCGVQyqfdaFFfJKVAqKlBGbZFoG3eCcGh8jCNC8eNM7v24m4/8RboTV/ 3ThqZVHlC/aredOVH/3sB47re4GVv82vSyFLInF6M6yxCMLSNlfPIT2D9KhLwG5ww/lK ntehla41UrnRswErQv2a6XbGSnFhFm3XUGJUe8cymvRZ4Pba/95WxfpKlIuMnJ/dJDVC k3PbjxwOkGDPZpZOf58r2qIXoWGSQ6Zqmvkl7JoowQdO3yfB5FbTHKvcXC43Ghb+WV14 QBY6vT0lLcyFrUhoU7UScloCB29nPFJqa75jvSwD6jM4UW3zaRNDhckLoXAY/XzSgAuU pW8A== X-Received: by 10.224.60.193 with SMTP id q1mr4133476qah.86.1423197351733; Thu, 05 Feb 2015 20:35:51 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.229.28.72 with HTTP; Thu, 5 Feb 2015 20:35:11 -0800 (PST) In-Reply-To: References: Date: Fri, 6 Feb 2015 13:35:11 +0900 X-Google-Sender-Auth: I_VylACVbo1s8fRtVsMLxWZ2amI Message-ID: To: Pierre Joye Cc: Adam Harvey , PHP internals , Leigh , reeze Content-Type: multipart/alternative; boundary=001a1133dee6987028050e63f4d5 Subject: Re: [PHP-DEV] Re: [RFC][DISCUSSION] script() and script_once() From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a1133dee6987028050e63f4d5 Content-Type: text/plain; charset=UTF-8 Hi Pierre, On Fri, Feb 6, 2015 at 1:16 PM, Pierre Joye 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 --001a1133dee6987028050e63f4d5--