Which permissions should be for symfony 3 folders and files?

北慕城南 提交于 2019-12-02 23:49:14

问题


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... ;)



来源:https://stackoverflow.com/questions/48501277/which-permissions-should-be-for-symfony-3-folders-and-files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!