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
- Fatal error: Uncaught Error: Class "Illuminate\Foundation\Application" not found
- How to check column value of a record is null or not in laravel
- Define variable and use in Laravel controller method
- How to pass data to multiple partial view files in laravel
- How to check query string exists or not in laravel blade
- Argument 1 passed to Illuminate\Database\Query\Builder::cleanBindings() must be of the type array, null given
- How to create and run user seeder in laravel
- Display option of select as selected with blade directive Laravel
- Laravel hasmany select not working
- Route group with URI prefix using middleware and route name prefixes
- The POST method is not supported for this route. Supported methods: PUT.
- How to insert dynamic value to additional column in pivot table in laravel
- How to get file extension from input type file in laravel
- Get all users except the followings users in overtrue laravel-follow
- How to Run CRON Job on LIVE SERVER on Cpanel in Laravel Project
- Check if Relationship Method Exists in Laravel
- There are no commands defined in the "route:" namespace
- How to get list of all views file in laravel
- How to add script on specific view file in laravel while extending layout
- Ignore Records where a field has NULL value in Laravel
- How to validate form input data in laravel
- How to create projects method with belongstomany relationship in user model
- How to get only time from created_at in laravel
- How to include header file in laravel
- How to check if user has created any post or not in laravel