How to set up file permissions for Laravel?

前端 未结 15 2411
忘了有多久
忘了有多久 2020-11-22 00:08

I\'m using Apache Web Server that has the owner set to _www:_www. I never know what is the best practice with file permissions, for example when I create new La

15条回答
  •  半阙折子戏
    2020-11-22 00:24

    Most folders should be normal "755" and files, "644"

    Laravel requires some folders to be writable for the web server user. You can use this command on unix based OSs.

    sudo chgrp -R www-data storage bootstrap/cache
    sudo chmod -R ug+rwx storage bootstrap/cache
    

提交回复
热议问题