1

Hi I'm facing a very frustrating problem, my laravel instance is showing this error.

ErrorException in Filesystem.php line 74:
file_put_contents(/43dc150b6c864d7c0166002994bb8cbc): failed to open stream: Permission denied

the storage directory is writable and app,framework, logs directory is also created in that folder, I've also change the permission of storage to 775 but still such error appear. How can I fix this?

Thanks

8
  • Is the user running your http server inside the group of the owner of the storage directory? Because otherwise it just falls into "all users", and the '5' of '775' prevents him from writing.
    – Amarnasan
    Nov 27, 2015 at 10:47
  • That doesn't answers the question. Try changing (temporarily) your storage (and subdirectories) to '777' to double check it is not a privilege problem.
    – Amarnasan
    Nov 27, 2015 at 10:50
  • But you said you managed to change the permission of storage to 775... then you can change it to 777.
    – Amarnasan
    Nov 27, 2015 at 10:53
  • Can you find out where is the directory it is trying to create that file? Can't you show the full stack error?
    – Amarnasan
    Nov 27, 2015 at 10:58
  • Make a <?php echo sys_get_temp_dir();?> . That's (probably) the directory where Laravel is trying to create temporary files. Make sure it has privileges to create files there.
    – Amarnasan
    Nov 27, 2015 at 11:01

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.