I
I
Ilya2019-10-18 14:08:12
Access rights
Ilya, 2019-10-18 14:08:12

Permissions and owner of Yii2 folders, www-data on everything?

Hello. I'm new, please help!
Given: nginx+php-fpm server
Task: security-correct permissions and framework folder owners.
Can't decide who should be the owner. There is a www-data user (nginx user), there is a user, there is a root. Root was forgotten. Further. the /web folder of the framework is accessible from the web, index.php lives in it, everything else lives a level above . The framework was set from under the user user through Composer and, accordingly, it is not possible to generate files from Gii.
What to do? All to create from under www-data? Or is it not correct?
Yii2 install via composer

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey, 2019-10-18
@IlyaSpirit

you for development or for production?
in general, a good option is the owner user, group www-data. the group has read-only rights, where necessary - write.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question