#29615 [Opn->Csd]: is_writable / is_readable / is_executable should use access() instead of stat()
| From: | magnus@php.net | Date: | Fri, 07 Jan 2005 16:10:07 +0000 |
| Subject: | #29615 [Opn->Csd]: is_writable / is_readable / is_executable should use access() instead of stat() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-71570@lists.php.net to get a copy of this message | ||
ID: 29615
Updated by: magnus@php.net
Reported By: liamr at umich dot edu
-Status: Open
+Status: Closed
Bug Type: Feature/Change Request
Operating System: linux
PHP Version: 5.0.0
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
posix_access() have been added.
Will be in 5.1.
Previous Comments:
------------------------------------------------------------------------
[2004-08-11 16:01:15] liamr at umich dot edu
Description:
------------
The filesystem commands is_writable / is_readable / is_executable are
now using stat() instead of access(), which doesn't return accurate
results in a number of situations:
- on many network filesystems
- if the system uses ACLS
- if you have more groups than just initgroups
The current version only works on simple (unextened) unix filesystem -
filesystems that only use the traditional unix octets for access
control.
the filesystem commands that check file system access should be based
on access() instead of stat():
http://www.opengroup.org/onlinepubs/009695399/functions/access.html
Acc'd to CVS the is_writable stuff changed when php_stat was routed
through the streams API:
http://cvs.php.net/diff.php/php-src/ext/standard/filestat.c?r1=1.127&r2=1.128&ty=h
There's a bug report from a couple of years ago that suggests adding an
access() command to the posix extention:
http://bugs.php.net/bug.php?id=14924
If you want to keep the functionality gained by routing php_stat
through the streams API, how about offering access() through the posix
commands?
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=29615&edit=1