#49762 [NEW]: unlink can't handle posix acls
| From: | jonas at brachium-system dot net | Date: | Sat, 03 Oct 2009 21:42:06 +0000 |
| Subject: | #49762 [NEW]: unlink can't handle posix acls | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-143223@lists.php.net to get a copy of this message | ||
From: jonas at brachium-system dot net
Operating system: Debian Lenny
PHP version: 5.2.11
PHP Bug Type: Filesystem function related
Bug description: unlink can't handle posix acls
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 bug report at http://bugs.php.net/?id=49762&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49762&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49762&r=trysnapshot53
Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49762&r=trysnapshot60
Fixed in SVN: http://bugs.php.net/fix.php?id=49762&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49762&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=49762&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=49762&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=49762&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=49762&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=49762&r=support
Expected behavior: http://bugs.php.net/fix.php?id=49762&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=49762&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=49762&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=49762&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49762&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=49762&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=49762&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=49762&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=49762&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=49762&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=49762&r=mysqlcfg