ID: 43907
Updated by: [EMAIL PROTECTED]
Reported By: sergio at gruposinternet dot com dot br
-Status: Open
+Status: Feedback
Bug Type: Directory function related
Operating System: Freebsd 6.2
PHP Version: 5.2.5
New Comment:
And you're sure system umask() is not forcing something else here?
Previous Comments:
------------------------------------------------------------------------
[2008-01-22 13:37:41] sergio at gruposinternet dot com dot br
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 this bug report at http://bugs.php.net/?id=43907&edit=1