From: bugzilla-php at bwurst dot org Operating system: gentoo linux (kernel 2.6) PHP version: 5.0.2 PHP Bug Type: Filesystem function related Bug description: is_writable() and is_readable() return false when access is permitted via ACL
Description: ------------ PHP's is_readable() and is_writable() function report nonsense on ACLs... We have the following test case: A file containing <?php echo __FILE__.' is '.(is_readable(__FILE__) ? '' : 'NOT ')."readable!<br>\n"; echo __FILE__.' is '.(is_writable(__FILE__) ? '' : 'NOT ')."writable!<br>\n"; ?> it's made accessible to the webserver via $ getfacl index.php # file: index.php # owner: someuser # group: webadm user::rw- user:apache:rw- group::r-- mask::rw- other::--- So apache is neither the owner nor in the group but it's accessible through ACL. If I call this file via the webserver, I get /srv/http/[...]/test/index.php is NOT readable! /srv/http/[...]/test/index.php is NOT writable! [...] has been inserted by me, of course. This method works perfectly, the webserver (and also PHP) *can* read and write the file but the is_readable() and is_writable() return wrong values. It really seems like bug #14923, but that one's fixed after php-4.1.0. Also it's CLOSED, so I cannot add a comment there. :-( -- Edit bug report at http://bugs.php.net/?id=30931&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30931&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30931&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30931&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=30931&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=30931&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=30931&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=30931&r=needscript Try newer version: http://bugs.php.net/fix.php?id=30931&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=30931&r=support Expected behavior: http://bugs.php.net/fix.php?id=30931&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=30931&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=30931&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=30931&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30931&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=30931&r=dst IIS Stability: http://bugs.php.net/fix.php?id=30931&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=30931&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=30931&r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=30931&r=mysqlcfg