skip to Main Content

Generally in ubuntu changing ownership to www-data and 775 permission solve this problem. But in centos 8 this seems not enough. What I did is-

  1. Set SELinux in permissive mode
  2. Allow to write in the laravel storage folder – chcon -R -t httpd_sys_rw_content_t storage
  3. sudo chown -R nginx:nginx /path/to/your/laravel/root/directory
  4. chmod -R 775 storage/
  5. Reboot the system

Nothing is working. What to do solve this problem?

3

Answers


  1. From the projects root folder try:

        sudo chmod -R gu+w storage/
        sudo chmod -R guo+w storage/
        sudo chmod -R gu+w bootstrap/cache/
        sudo chmod -R guo+w bootstrap/cache/
    
    Login or Signup to reply.
  2. Turns out the issue is with selinux

    This worked for me

    sudo chcon -R -t httpd_sys_rw_content_t /path/to/log/directory
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search