PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, January 21, 2022

[FIXED] laravel centOS 8 "log file could not be opened in append mode: failed to open stream: Permission denied”

 January 21, 2022     centos8, laravel, selinux     No comments   

Issue

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?


Solution

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/


Answered By - jeremykenedy
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing