From:             lukl at eabrno dot cz
Operating system: Linux CentOS 6.4
PHP version:      5.4.18
Package:          Filesystem function related
Bug Type:         Bug
Bug description:fileperms function reports wrong permissions on a file with ACL

Description:
------------
Executing a code bellow for a file/directory with extended permissions
(ACL) 
return wrong results.
E.g. a file with these ACLs (display permissions using OS getfacl
command):

# file: file
# owner: user
# group: apache
user::rwx
group::r-x
group:webmasters:rwx
group:users:rwx
mask::rwx
other::---

The PHP code however returns 0757, which is weird (other has no permissions
at 
all, but according fileperms it has rwx).

When I clear any extended permissions, the PHP code returns expected result
of 
0750.

Test script:
---------------
<?php

echo substr(decoct( fileperms("file") ) , 2);

?>


-- 
Edit bug report at https://bugs.php.net/bug.php?id=65482&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=65482&r=trysnapshot54
Try a snapshot (PHP 5.3):   
https://bugs.php.net/fix.php?id=65482&r=trysnapshot53
Try a snapshot (trunk):     
https://bugs.php.net/fix.php?id=65482&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=65482&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=65482&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=65482&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=65482&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=65482&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=65482&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=65482&r=notwrong
Not enough info:            
https://bugs.php.net/fix.php?id=65482&r=notenoughinfo
Submitted twice:            
https://bugs.php.net/fix.php?id=65482&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=65482&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65482&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=65482&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=65482&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=65482&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=65482&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=65482&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=65482&r=mysqlcfg

Reply via email to