0

I know this is a common problem on Laravel, but I think I'm having a different issue or else the settings aren't being updated.

I've looked at this Laravel The stream or file "/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied and this How to set up File Permissions for Laravel 5 (and others) but I still have this issue:

The stream or file "/var/www/html/laravelwebapp/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied

When I do this after going into the logs directory: $ ls -l laravel.log

I get this:

-rwxrwxr-x 1 apache apache 0 Feb 8 2018 laravel.log

I'm on CentOS which is why the group/user is apache not www-data. Yet even though the log is created by apache and apache is the owner and group, it can't open the stream? Does this mean Laravel is executing as another user? I'm a bit confused here, sorry :/

I've cleared the cache using artisan and also ran composer dump-autload but I can't seem to progress in my application because the log doesn't get written to.

Update: My php application is running as nobody when I run

echo exec('whoami');

Is this the problem and how do I fix that?

Summer Developer
  • 2,056
  • 7
  • 31
  • 68

0 Answers0