From:             php at displague dot com
Operating system: linux
PHP version:      5.2.5
PHP Bug Type:     Directory function related
Bug description:  mkdir will not apply group sticky from supplied mode

Description:
------------
The php function mkdir() does not apply the group sticky bit on folders
created.  The php function chmod() is capable of doing this.

Previous, closed, bug reports show that mkdir() premitted sticky bits in
the past when chmod() did not.

All of my safe_ variables are off:

[EMAIL PROTECTED] tmp]$ php -r 'phpinfo();' | grep ^safe
safe_mode => Off => Off
safe_mode_exec_dir => no value => no value
safe_mode_gid => Off => Off
safe_mode_include_dir => no value => no value
safe_mode_allowed_env_vars => PHP_ => PHP_
safe_mode_protected_env_vars => LD_LIBRARY_PATH => LD_LIBRARY_PATH


Reproduce code:
---------------
rm -rf test2 test3;
php -r '
  umask(0);
  mkdir("test2", 02770);
  mkdir("test3",02770);
  chmod("test3",02770);';
ls -lad test2 test3

Expected result:
----------------
drwxrws--- 2 mjohansson mjohansson 4096 Feb 28 13:05 test2
drwxrws--- 2 mjohansson mjohansson 4096 Feb 28 13:05 test3

Actual result:
--------------
drwxrwx--- 2 mjohansson mjohansson 4096 Feb 28 13:05 test2
drwxrws--- 2 mjohansson mjohansson 4096 Feb 28 13:05 test3

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

Reply via email to