How to set up file permissions for Laravel?

前端 未结 15 2514
忘了有多久
忘了有多久 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:42

    Add to composer.json

    "scripts": {
        "post-install-cmd": [
          "chgrp -R www-data storage bootstrap/cache",
          "chmod -R ug+rwx storage bootstrap/cache"
        ]
    }
    

    After composer install

提交回复
热议问题