ID:               49762
 User updated by:  jonas at brachium-system dot net
 Reported By:      jonas at brachium-system dot net
-Status:           Open
+Status:           Bogus
 Bug Type:         Filesystem function related
 Operating System: Debian Lenny
 PHP Version:      5.2.11
 New Comment:

error hat user


Previous Comments:
------------------------------------------------------------------------

[2009-10-03 21:42:06] jonas at brachium-system dot net

Description:
------------
the php function unlink can't handle posix acls. The function
is_writeable **can** handle posix acls. See #34957


my acl on file 'foo':
----------------------
# file: foo
# owner: jonas.genannt
# group: users
user::rw-
group::r-x                      #effective:r--
group:www-data:rw-
mask::rw-
other::---

The php script runs as user www-data and group www-data. 

The function unlink fails on posix acls but is_writeable seems to be
handling posix acls.



Reproduce code:
---------------
<?php
if (is_writeable('foo')) {
        echo "fooo is Writeable<br/>";
        if (unlink('foo')) {
                echo "Removed!";
        }
        else {
                echo "NOT REMOVED!<br/>";
        }
}
?>

Expected result:
----------------
fooo is Writeable
Removed

Actual result:
--------------
fooo is Writeable
Warning: unlink(foo) [function.unlink]: Permission denied in test.php
on line 4
NOT REMOVED!


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=49762&edit=1

Reply via email to