From:             liamr at umich dot edu
Operating system: linux 
PHP version:      5.0.0
PHP Bug Type:     Feature/Change Request
Bug description:  is_writable / is_readable / is_executable should use access() 
instead of stat()

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 bug report at http://bugs.php.net/?id=29615&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=29615&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=29615&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=29615&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=29615&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=29615&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=29615&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=29615&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=29615&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=29615&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=29615&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=29615&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=29615&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29615&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=29615&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=29615&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=29615&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29615&r=float

Reply via email to