#25318 [NEW]: File::_getFilePointer() checks writable permissions on dir instead of file
| From: | marshall at exclupen dot com | Date: | Sat, 30 Aug 2003 01:57:32 +0000 |
| Subject: | #25318 [NEW]: File::_getFilePointer() checks writable permissions on dir instead of file | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-20842@lists.php.net to get a copy of this message | ||
From: marshall at exclupen dot com
Operating system:
PHP version: Irrelevant
PHP Bug Type: PEAR related
Bug description: File::_getFilePointer() checks writable permissions on dir instead of file
Description:
------------
From File::_getFilePointer():
// Writeable?
} elseif ( (FILE_MODE_WRITE == $mode OR FILE_MODE_APPEND == $mode)
AND !file_exists($filename)
AND !is_writeable(dirname($filename))) {
return PEAR::raiseError('Could not create file: ' . $filename);
} elseif ( (FILE_MODE_WRITE == $mode OR FILE_MODE_APPEND == $mode)
AND !is_writeable(dirname($filename))) {
return PEAR::raiseError('File is not writeable: ' . $filename);
}
I believe that the second elseif should read:
AND !is_writeable($filename)) {
The file can have writable permissions even though the directory it's in
does not.
--
Edit bug report at http://bugs.php.net/?id=25318&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25318&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25318&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=25318&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=25318&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=25318&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=25318&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=25318&r=support
Expected behavior: http://bugs.php.net/fix.php?id=25318&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=25318&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=25318&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=25318&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25318&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=25318&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=25318&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=25318&r=gnused