#43907 [Opn->Fbk]: mkdir function ignore permission mask.

From: Date: Sat, 26 Jan 2008 01:22:28 +0000
Subject: #43907 [Opn->Fbk]: mkdir function ignore permission mask.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-121567@lists.php.net to get a copy of this message
ID: 43907 Updated by: jani@php.net 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

« previous php.bugs (#121567) next »