Bug #76698 [Nab]: mkdir doesn't handle group write permission with 0770 mode
| From: | requinix@php.net | Date: | Fri, 03 Aug 2018 14:02:55 +0000 |
| Subject: | Bug #76698 [Nab]: mkdir doesn't handle group write permission with 0770 mode | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-216558@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=76698&edit=1
ID: 76698
Updated by: requinix@php.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:
Excellent. So we agree that PHP is behaving the way it's supposed to.
https://github.com/php/php-src/blob/PHP-7.2.8/Zend/zend_virtual_cwd.c#L1766
https://linux.die.net/man/2/mkdir
Next time, make sure you have your facts straight so you don't end up arguing against yourself.
Previous Comments:
------------------------------------------------------------------------
[2018-08-03 13:52:38] spam2 at rhsoft dot net
> 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"
------------------------------------------------------------------------
[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
------------------------------------------------------------------------
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