user11995722
user11995722

Reputation:

How to keep 777 on var/cache/prod (Symfony 5)

I'm using Symfony 5. When I clear the cache, the var/cache/prod folder loses permission 777. On my production server, if the var/cache/prod folder is not in 777, I cannot send a form (error 500).

How can I fixed that ?

Upvotes: 1

Views: 1923

Answers (1)

Aleksandr
Aleksandr

Reputation: 431

You need to add a group for the directory creator to which the process running php scripts belongs and give rights to write to the second var of this group.

If you use php-fpm with default settings, then you need to add www-data groups for the user who owns the project directory and set permissions as in the example.


usermod -a -G www-data you_user_name
chmod 664 /path_to_you_project/var

Upvotes: 1

Related Questions