Answer the question
In order to leave comments, you need to log in
What permissions should be given to the Apache www-data user?
Hello!
I am developing a small web application.
When registering, the /users/"user->id"/ folder is immediately registered for the user. I
create a folder using php mkdir, but it is not created.
In the future, files will be uploaded to this folder by the parser, which is written in python and is executed using shell_exec("parser launch command");
I understand that the www-data user does not have enough rights, but I don’t know what rights to give so that I can perform these actions and everything is safe.
Ubuntu 18.04 Apache.
Answer the question
In order to leave comments, you need to log in
chown -R www-data:www-data /var/www/site.ru
but it's best to do the following option
to run Apache for each site under your users
, it all depends on the PHP presentation mode
chown www-data /users
chmod u+rwx /users
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question