jgnasser's avatar

Mission Session Files

I have been running into this error ErrorException file_put_contents(/home/vagrant/code/{appName}/storage/framework/sessions/R5wfYmXe8OK5ee0k0dE7JG4572nm8Uu2Q5Asm0Fw): failed to open stream: Permission denied

The problem is, there are no session files in the sessions directory. But the driver in config.sessions.php is set to file. My guess is I am missing something or that homestead is storing and trying to access some other session files (obviously not table sessions) because the sessions driver is set to file so I expected to at least see the the files.

I have tried all tricks I can imagine. Like running php artisan optimize:clear and all other clears like config:clear, view:clear, route:clear, artisan clear compiled. Nothing seem to work.

I have set permissions with chmod -R 775 storage/framework/sessions, nothing seem to work.

0 likes
4 replies
bobbybouwmann's avatar

Try running the following commands inside the vagrant box

sudo chgrp -R www-data storage bootstrap/cache
sudo chmod -R ug+rwx storage bootstrap/cache

Also, make sure to try and run vagrant --provision once so it applies all steps to the box again. This could help as well.

jgnasser's avatar

Thanks @bobbybouwmann, I appreciate. However it turns out I had issues with virtualisation. All I needed to do was update homestead and VirtualBox.

This is ok now.

jgnasser's avatar

...it would be helpful to add that I realised that even some other apps which I had hosted successfully(locally though) also went berserk in the same fashion. This is when I realised something sinister was at play. I had earlier run some commands to upgrade homestead but it appears it did not go well.

Please or to participate in this conversation.