file_put_contents(/var/www/html/w3code/storage/framework/sessions/CXwN3EXKxERD6jgy3rADcaAAbAx8FRKih2JK7UO9): Failed to open stream: Permission denied
The error "file_put_contents() failed to open stream: Permission denied for Session folder" in Laravel usually occurs when the server does not have sufficient permissions to write to the sessions folder. To resolve this issue, make sure the web server has write permissions for the storage/framework/sessions directory.
Here is a step by step guide to solve the above error.
Open window terminal using CTRL + ALT + T shortcut keys.
Now you have to run the below command to give the necessary permission to storage/session folder.
sudo chmod 755 -R /var/www/html/laravel-project/storage
Note: You have to change the text laravel-project with your laravel project name in above command.
If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.
Don't forget to share this article! Help us spread the word by clicking the share button below.
We appreciate your support and are committed to providing you valuable and informative content.
We are thankful for your never ending support.
Random Code Snippet Queries: Laravel
- How to check email is valid or not in Laravel
- SQLSTATE[42000]: Syntax error or access violation: 1075 Incorrect table definition; there can be only one auto column and it must be defined as a key
- How to create controller in laravel
- Generate unique username in Laravel
- Method Illuminate\Database\Eloquent\Collection::appends does not exist
- Automatically remove records using Prunable trait in Laravel
- Import/Use Storage facade in laravel
- The Pusher library requires the PHP cURL module. Please ensure it is installed
- Add a subselect based on relationship using withAggregate method
- How to insert value to additional columns in pivot table in laravel
- Post model with title and body in laravel 8
- How to get single column value in laravel
- Laravel change date format
- Display first n record from collection in laravel view
- Input file with max size validation in laravel
- How to delete record in Laravel with ajax
- Where to use whereNotNull eloquent in laravel
- Laravel 11 step by step instructions to upload file in storage directory and display in blade file
- How to create and run user seeder in laravel
- How to pass data to multiple partial view files in laravel
- Send id with route Laravel
- Class "App\Http\Controllers\Auth\Verified" not found
- Fatal error: Uncaught Error: Class "Illuminate\Foundation\Application" not found
- Laravel recursive function in controller
- Laravel get count with where condition