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?

  • one
    Try to better specify the owner, on whose behalf the files are opened in nginx. For example, chown -R www:www /var/www/html - check1st

2 answers 2

Of course not. folder rights - 755, for files - 644

Here more

  • 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