|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-03-03 14:46 UTC] jani@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 18:00:01 2025 UTC |
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: [mjohansson@host 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