Bug #68092 [Opn->Nab]: chmod still works after being disabled via disable_functions

From: Date: Mon, 06 Oct 2014 08:21:31 +0000
Subject: Bug #68092 [Opn->Nab]: chmod still works after being disabled via disable_functions
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-187878@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=68092&edit=1 ID: 68092 Updated by: datibbaw@php.net Reported by: software-php at interfasys dot ch Summary: chmod still works after being disabled via disable_functions -Status: Open +Status: Not a bug Type: Bug Package: PHP options/info functions Operating System: FreeBSD PHP Version: 5.4.33 Block user comment: N Private report: N New Comment: Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. The following test case works as expected: --TEST-- Test chmod() when disabled --INI-- disable_functions = "chmod" --FILE-- <?php chmod(__FILE__, 0644); --EXPECTF-- Warning: chmod() has been disabled for security reasons in %s on line %d Previous Comments: ------------------------------------------------------------------------ [2014-09-24 20:19:57] software-php at interfasys dot ch Description: ------------ I'm using PHP-FPM 5.4.33 In a secondary ini file add a section which will apply to one website and disable chmod [HOST=my.web.site] disable_functions = "chmod" Check that the function is disabled via phpinfo() In my case, the local value for disable_functions shows "chmod" Create a simple script which chmods a file Test script: --------------- if (!ini_get('display_errors')) { ini_set('display_errors', '1'); } echo ini_get('display_errors'); echo "I am chowning a file"; chmod("testcase.php", 0777); Expected result: ---------------- I should get an error message telling me that this is not allowed Actual result: -------------- The file is chowned to 777. Not that if the same function is added to Suhosin's blacklist, then I will get the proper warning: "Warning: chmod() has been disabled for security reasons" ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=68092&edit=1

« previous php.bugs (#187878) next »