P
P
Pavel2017-09-21 16:14:27
PHP
Pavel, 2017-09-21 16:14:27

How to allow php to do mkdir()?

mkdir(): Permission denied
PHP works like cgi with PHP-FPM. All folders have rights 755 and the owner is user. I tried to put 777 on the public folder (it is inside the folder with the domain). You need to create folders in it via mkdir. As far as I understand, php is run by my user nobody, is it really necessary to put 777 on the entire public_html, so that mkdir would work?
Centos 7, cPanel

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Satisfied IT, 2017-09-21
@Palych_tw

The owner is user, and from which user does php-frm run? Set the owner to the same user and try.

A
Alexey, 2017-09-21
@lolobrigit

give the script permission to execute

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question