#30931 [Com]: is_writable() and is_readable() return false when access is permitted via ACL
| From: | kibab at icehouse dot net | Date: | Mon, 25 Apr 2005 15:32:42 +0000 |
| Subject: | #30931 [Com]: is_writable() and is_readable() return false when access is permitted via ACL | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-78172@lists.php.net to get a copy of this message | ||
ID: 30931
Comment by: kibab at icehouse dot net
Reported By: bugzilla-php at bwurst dot org
Status: No Feedback
Bug Type: Filesystem function related
Operating System: gentoo linux (kernel 2.6)
PHP Version: 5.0.2
New Comment:
This is not fixed yet as of Mar. 31 in the 5.0.4 release.
Previous Comments:
------------------------------------------------------------------------
[2005-03-08 01:00:08] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
------------------------------------------------------------------------
[2005-02-28 21:21:59] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
------------------------------------------------------------------------
[2004-11-29 17:26:56] bugzilla-php at bwurst dot org
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 this bug report at http://bugs.php.net/?id=30931&edit=1