laravel.log could not be opened: failed to open stream: Permission denied

Published 1 week ago by dohisev

I just installed Laravel on a centos server and it doesn't work due the permissions. I was wondering how to solve this?

Dry7
Dry7
1 week ago (134,770 XP)

@dohisev try

chmod 777 /storage/logs/laravel.log
dohisev

I was reading that 777 isn't safe so that is why I came here to ask you guys about that... and also reading the docs it says that I need permision on storage folder and bootstrap or something like that.

Snapey
Snapey
1 week ago (678,595 XP)
dohisev

I saw that thread and tried to run the commands but most of them the server says invalid user for chown and invalid group for chgrp.

Talinon
Talinon
1 week ago (39,120 XP)

I think CentOS uses 'apache' for group ownership, not 'www-data'

dohisev

chgrp: invalid group: 'apache'

Snapey
Snapey
1 week ago (678,595 XP)

you should not need to change ownership of anything, just concentrate on permissions.

Delete any Log file that already exists in case it is not owned by the webserver

dohisev

The only permission that works is setting 0777 to storage, other than that doesn't work.

Please sign in or create an account to participate in this conversation.