简体   繁体   中英

Mkdir permission denied php nginx

I Tried create dir with php code mkdir($folder, 777, true); , but return mkdir(): Permission denied , how i can solve this ?

Obs: I using: nginx, php7-fpm and owner folder www is www-data

Your code:

mkdir($folder, 777, true);

Add a zero before 777 , It may solve the problem:

mkdir($folder, 0777, true);

Also, check with your localhost publish permissions.

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