php.net |  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
Votes:3
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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: spam at noamik dot de
New email:
PHP Version: OS:

 

 [2009-06-01 02:51 UTC] spam at noamik dot de
Description:
------------
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: function.is-readable
---


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 ...

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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] jani@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/


 [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-2019 The PHP Group
All rights reserved.
Last updated: Tue Nov 19 10:01:34 2019 UTC