php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48618 getPerms doesn't returns right perms
Submitted: 2009-06-20 15:56 UTC Modified: 2009-10-07 01:00 UTC
Votes:3
Avg. Score:1.7 ± 0.9
Reproduced:2 of 3 (66.7%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: agiorg at gmail dot com Assigned:
Status: No Feedback Package: SPL related
PHP Version: 5.3.0RC4 OS: ubuntu
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: agiorg at gmail dot com
New email:
PHP Version: OS:

 

 [2009-06-20 15:56 UTC] agiorg at gmail dot com
Description:
------------
We are actually testing the DirectoryIterator class (we're joining the TestFest). So, the virtual machine we're working on runs PHP 5.3.0RC3.
After creating a new folder, both using mkdir or shell_exec('mkdir'), getPerms doesn't returns right perms (we checked out straightly on the shell and the permissions were as expected).

Reproduce code:
---------------
mkdir('test', 0744);
$dir=new DirectoryIterator('test');
var_dump(decoct($dir->getPerms()));

Expected result:
----------------
string(5) "40744"

Actual result:
--------------
string(5) "40755"

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-06-20 22:01 UTC] majkl578 at gmail dot com
tested code:
<?php
mkdir('/tmp/test', 0744);
$dir=new DirectoryIterator('/tmp/test');
var_dump(decoct($dir->getPerms()));
?>
-------
returns 41777
-------
OS: Debian Lenny (unstable)
PHP Version: PHP 5.3.0RC4
 [2009-09-29 15:15 UTC] jani@php.net
Please try using this snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/


 [2009-10-07 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jan 15 12:01:29 2025 UTC