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:
mkdir($dir, 0700);
should result in 700
mkdir($dir, 0770);
shoukd result in 770
full stop
Previous Comments:
------------------------------------------------------------------------
[2018-08-03 14:02:55] requinix@php.net
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#L1766https://linux.die.net/man/2/mkdir
Next time, make sure you have your facts straight so you don't end up arguing against yourself.
------------------------------------------------------------------------
[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.
------------------------------------------------------------------------
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