mardon
mardon

Reputation: 1125

laravel 4 centos 7 storage permission

Hi I deploy my laravel4 script form my notebook to production on own VPS server with CentOS7 by git. I have problem with permission to storage folder. I obtain the error

 file_put_contents(/var/www/myweb/app/storage/views/0353b2081a97162a6d5fdda4c3a3f918): failed to

open stream: Permission denied

i try change permission to storage directory by this by this

 cd app/

chown -R apache:apache storage

cd storage/

find . -type d -exec chmod 775 {} \; && find . -type f -exec chmod 664 {} \;

but the error is still same. How I must set permisiion for solve this problem on CentOS 7 ?

Upvotes: 0

Views: 654

Answers (1)

rocordial
rocordial

Reputation: 11

It's an old post but still ...

It seem to be a selinux problem.

I installed my Laravel application in /opt/web/myapp and did all the steps mardon did. No luck.

Then I did sudo setenforce Permissive and it worked.

I'll be back with the proper selinux labels after a few tests.

Upvotes: 1

Related Questions