Which permissions should be for symfony 3 folders

2019-03-07 04:20发布

问题:

I've reinstall Ubuntu 16.04 and after getting pull my symfony 3.4 project from git, it loads but without CSS and JS. I think that the problem with the permissions for folders and files.

回答1:

If it's permissions related, then first make sure of which user is your web user.
If you never changed it, then it's www-data

As for the permissions, do this (replace www-data if needed):

chown -R www-data:www-data /var/www/
find /var/www/ -type d -exec chmod 775 "{}" \;
find /var/www/ -type f -exec chmod 664 "{}" \;
find /var/www -type d -exec chmod g+s "{}" \;



[Side note]

You're using too many tags.
file-permissions, symfony, ubuntu should have been enough... ;)