How to set permissions on folders and files in Ubuntu? There is a server to which I connect remotely. It is worth Nginx. I put php files in the / var / www / html folder, but I can’t run them remotely, since there are no rights. Will the 777 folder be set correctly for security reasons?
2 answers
Of course not. folder rights - 755, for files - 644
- Well, what if I use FTP to connect to the server and work with files? 644 will not allow me to modify them. - quaresma89
|
This is sometimes what ecli put with php-fpm. If yes, then check by whom php-fpm is started in /etc/php-fpm.d/www.conf Must be user: nginx group: nginx
|
chown -R www:www /var/www/html- check1st