Edit report at https://bugs.php.net/bug.php?id=76698&edit=1
ID: 76698
Comment by: spam2 at rhsoft dot net
Reported by: zoeslam at gmail dot com
Summary: mkdir doesn't handle group write permission with
0770 mode
Status: Not a bug
Type: Bug
Package: *Directory/Filesystem functions
Operating System: Debian Stretch
PHP Version: 7.2.8
Block user comment: N
Private report: N
New Comment:
> So you're saying PHP should pass the mode directly to > the operating system, without doing anything regarding the umask?
exactly!
when i say "mode 0770" i mean exactly that
when i say nothing about mode i imean "use the current umask"
Previous Comments:
------------------------------------------------------------------------
[2018-08-03 13:48:17] requinix@php.net
So you're saying PHP should pass the mode directly to the operating system, without doing
anything regarding the umask?
------------------------------------------------------------------------
[2018-08-03 12:15:23] spam2 at rhsoft dot net
> Indeed, I have to say to myself RTFM about the mode argument:> https://secure.php.net/manual/en/function.mkdir.php
NO jesus
"The mode is also modified by the current umask, which you can change using umask()"
tlaking about anything else then DEFAULTS makes no sense
the whole problem likely is that it *has any default* instead just let the OS act on it's
defaults based on the umask and someone tried to coide fuzzy logik around that with the outcome we
now have
if a function whcih get 0770 as chmod-param reulsts in anything else then 0770 this is a bug - full
stop
------------------------------------------------------------------------
[2018-08-03 12:10:23] zoeslam at gmail dot com
Indeed, I have to say to myself RTFM about the mode argument:
https://secure.php.net/manual/en/function.mkdir.php
This can be closed.
------------------------------------------------------------------------
[2018-08-03 11:54:35] spam2 at rhsoft dot net
wrong behavior doesn't get better by nosense in docs
when i say 0770 i mean 0770, full stop
if i need to fire up a chmod after mkdir to have a conrtolled behavior please remove that idiotic
parameter entirely so people are awarw - hopefully next you don't tell me chmod() has also
ramndom behavior
frankly the whole point for the chmod param is that in case of umasks you you can make sure that
your script set what you say nd not relies on arbitary local defaults
------------------------------------------------------------------------
[2018-08-03 11:48:14] requinix@php.net
> the umask is for control default permission
No, it applies to default and explicit values. Read the docs.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=76698
--
Edit this bug report at https://bugs.php.net/bug.php?id=76698&edit=1