简体   繁体   中英

php mkdir not abiding by chmod rules i'm using

I have this snippet which actually makes the dir, but it's permissions are set to 755 and not 777. Why is the mkdir command not working correctly?

$path = 'assets/images/photoAlbums/'.$album;
$test = mkdir($path, 0777);

The mode is also modified by the current umask, which you can change using umask().

cf. http://www.php.net/manual/en/function.mkdir.php

The umask is set to 0002 by default (at least at my system and on cli), that way the write-Bit is not set for everyone.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM