Bug #54709 [Com]: is_writable returns false for a directory but php can create files inside it

From: Date: Mon, 19 Apr 2021 14:08:58 +0000
Subject: Bug #54709 [Com]: 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-233511@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 Comment by: florian dot berg dot privat at gmail dot com Reported by: schwarzenneger at hotmail dot com Summary: is_writable returns false for a directory but php can create files inside it 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 Block user comment: N Private report: N New Comment: Thank you for collecting useful information on bugs.php.net! A lot of interesting technical bugs information that I found for myself. As the owner of several websites about VPN applications and their functions (for Germany https://vpnwelt.com/ , Italy https://it.vpnwelt.com/ , France https://fr.vpnwelt.com/ and USA https://en.vpnwelt.com/)it is really very relevant to me. Regards, Florian from VPNwelt Previous Comments: ------------------------------------------------------------------------ [2016-06-26 04:22:20] php-bugs at lists dot php dot net 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. ------------------------------------------------------------------------ [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 (#233511) next »