From:             sergio at gruposinternet dot com dot br
Operating system: Freebsd 6.2
PHP version:      5.2.5
PHP Bug Type:     Directory function related
Bug description:  mkdir function ignore permission mask.

Description:
------------
mkdir function ignore permission mask for "group" and "others" bits.

safe_mode off


Reproduce code:
---------------
<?php
// recursive
mkdir("foo/bar/1/2/3/4/5", 0777, true);
// not recursive
mkdir("bar", 0777);

// setting only the first bit works.
mkdir("foo2/bar/1/2/3/4/5", 0700, true);
mkdir("bar2", 0700);
?>


Expected result:
----------------
$ ls -lh
total 4
drwxrwxrwx  2 grupos  grupos   512B Jan 22 11:15 bar
drwx------  2 grupos  grupos   512B Jan 22 11:21 bar2
drwxrwxrwx  3 grupos  grupos   512B Jan 22 11:12 foo
drwx------  3 grupos  grupos   512B Jan 22 11:21 foo2

Actual result:
--------------
$ ls -lh
total 4
drwxr-xr-x  2 grupos  grupos   512B Jan 22 11:15 bar
drwx------  2 grupos  grupos   512B Jan 22 11:21 bar2
drwxr-xr-x  3 grupos  grupos   512B Jan 22 11:12 foo
drwx------  3 grupos  grupos   512B Jan 22 11:21 foo2


-- 
Edit bug report at http://bugs.php.net/?id=43907&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=43907&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=43907&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=43907&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=43907&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=43907&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=43907&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=43907&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=43907&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=43907&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=43907&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=43907&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=43907&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=43907&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=43907&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=43907&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=43907&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=43907&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=43907&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=43907&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=43907&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=43907&r=mysqlcfg

Reply via email to