Bug #54709 [Fbk->NoF]: is_writable returns false for a directory but php can create files inside it

From: Date: Sun, 26 Jun 2016 04:22:22 +0000
Subject: Bug #54709 [Fbk->NoF]: is_writable returns false for a directory but php can create files inside it
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-201845@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=54709&edit=1 ID: 54709 Updated by: php-bugs@lists.php.net Reported by: schwarzenneger at hotmail dot com Summary: is_writable returns false for a directory but php can create files inside it -Status: Feedback +Status: No Feedback Type: Bug Package: IIS related Operating System: Windows XP SP3/IIS 5.1 PHP Version: 5.3SVN-2011-05-11 (snap) Assigned To: cmb Private report: N New Comment: No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Re-Opened". Thank you. Previous Comments: ------------------------------------------------------------------------ [2016-06-06 19:51:08] cmb@php.net > It seems to be fixed in 5.4.20. @schwarzenneger: can you confirm? ------------------------------------------------------------------------ [2014-03-07 20:50:59] sam at rmcreative dot ru It seems to be fixed in 5.4.20. ------------------------------------------------------------------------ [2011-05-11 12:40:55] schwarzenneger at hotmail dot com Description: ------------ --- From manual page: http://www.php.net/function.is-writable --- Quote: Returns TRUE if the filename exists and is writable. The filename argument may be a directory name allowing you to check if a directory is writable. Well it did not return true in the following test case. The file system is NTFS. Test script: --------------- var_dump(is_writeable("C:\\Inetpub\\wwwroot\\simplepiecache")); // false var_dump(is_writeable("\\Inetpub\\wwwroot\\simplepiecache")); // false var_dump(is_writeable("/Inetpub/wwwroot/simplepiecache")); // false var_dump(is_writeable("/Inetpub/wwwroot/simplepiecache/")); // false file_put_contents("/Inetpub/wwwroot/mln/simplepiecache/aaa.txt", "bbb"); // DOES create a file aaa.txt containing bbb echo file_get_contents("/Inetpub/wwwroot/mln/simplepiecache/aaa.txt"); // bbb Expected result: ---------------- var_dump(is_writeable("C:\\Inetpub\\wwwroot\\simplepiecache")); // should be true var_dump(is_writeable("\\Inetpub\\wwwroot\\simplepiecache")); // should be true var_dump(is_writeable("/Inetpub/wwwroot/simplepiecache")); // should be true var_dump(is_writeable("/Inetpub/wwwroot/simplepiecache/")); // should be true ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=54709&edit=1

« previous php.bugs (#201845) next »