Yandex
Update cookies preferences

File and directory permissions, chmod

File permissions should be 644, directory permissions 755.


 
If PHP is run by a specific user (using FastCGI or PHP-FPM), as recommended for security reasons, the recommended permissions for PHP files are 600. This is sufficient for both read and write access. To give read-only permissions, you should set it to 400.


 
In this case, 711 is sufficient for the directory with PHP files. These permissions are also sufficient for writing to the directory, since the operation is performed by the user.

 
In the case of PHP running as an apache module, the permissions on PHP should be 644, as well as on all other files. And writing to a file requires 666 and to a directory 777.