From: graham at wyenet dot net
Operating system: Solaris 10
PHP version: 5.2.5
PHP Bug Type: *Directory/Filesystem functions
Bug description: unlink() deleting full directorys.
Description:
------------
unlink() function will erase full (or empty) directories, where
permissions are ok.
This actually breaks test suite, test copy_variation4.phpt which creates
null files. The unlink actually removes the ext/standard/tests/file
directory and then of course the test suits crashes out.
Reproduce code:
---------------
<?php
unlink("test");
?>
Expected result:
----------------
PHP 5.2.3 on Solaris gives the following error.
[function.unlink]: Not owner in test.php
Although it would make more sence to be
[function.unlink]: Is directory in test.php
Actual result:
--------------
directory test is erased without warning, even if there are files present
in the directory. fsck will recover the files. It wont break ownership
permissions, and it wont erase directories containing file which where
ownership permissions come into place.
--
Edit bug report at http://bugs.php.net/?id=44638&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=44638&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=44638&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=44638&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=44638&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=44638&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=44638&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=44638&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=44638&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=44638&r=support
Expected behavior: http://bugs.php.net/fix.php?id=44638&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=44638&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=44638&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=44638&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44638&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=44638&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=44638&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=44638&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=44638&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=44638&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=44638&r=mysqlcfg