|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48443 is_readable returns false on a file which is readable for group
Submitted: 2009-06-01 02:51 UTC Modified: 2009-06-09 01:00 UTC
Avg. Score:4.0 ± 0.8
Reproduced:3 of 3 (100.0%)
Same Version:2 (66.7%)
Same OS:2 (66.7%)
From: spam at noamik dot de Assigned:
Status: No Feedback Package: Filesystem function related
PHP Version: 5.2.9 OS: Debian Lenny
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2009-06-01 02:51 UTC] spam at noamik dot de
When executing is_readable("/path/to/my/file.txt") the function returns false, even so file permissions are as follows:
-rw-rw---- 1 someuser www-data 1529 2009-06-01 04:28 file.txt
where www-data is a group the web server executing the script is member of.
To eliminate caching issues, clearstatcache(); has been executed before. The same goes for is_writable. I'm not shure if it is intended or a bug, but if it is intended, the documentation would be wrong (at least IMHO).
If it is intended, a similar function for group rights would be needed ...

Reproduce code:
From manual page:

Expected result:
In the above example, is_readable should return true ...

Actual result:
is_readable returns true, but file can be opened with fopen anyways ...


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-06-01 03:25 UTC] spam at noamik dot de
In actual result: it should read "is_readable returns *false*, but file can be opened with fopen anyways ..."
 [2009-06-01 09:05 UTC]
Please try using this CVS snapshot:
For Windows:

 [2009-06-09 01:00 UTC] 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".
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Jan 23 18:01:26 2021 UTC