There is no existing directory at /storage/logs and its not buildable: Permission denied
LaravelLaravel 5PermissionsLaravel Problem Overview
I have a problem with my Laravel deployment on a OVH web server.
After made
composer update
php artisan cache:clear
php artisan route:clear
php artisan dump-autoload
I have this answer:
There is no existing directory at /storage/logs and its not buildable: Permission denied
I put all the files on 777 chmod but I have always this answer.
Laravel Solutions
Solution 1 - Laravel
Please try the following commands
php artisan route:clear
php artisan config:clear
php artisan cache:clear
Note: In case you are a Homestead & VirtualBox user, please be sure that your VirtualBox is up to date.
It helped in this [thread at laracasts][1]
[1]: https://laracasts.com/discuss/channels/laravel/there-is-no-existing-directory-at-storagelogs-and-its-not-buildable-permission-denied "thread at laracasts"
Solution 2 - Laravel
Clear the cache and config, then deploy to the live server.
If you've already uploaded to the live server, then you have to follow these steps:
- Delete
bootstrap/cache/config.php
- Delete all log files in
storage/logs
.
Solution 3 - Laravel
You don't need to add any permission on the storage file.
- The main problem here is in the compiled file, and due to which laravel try to show an error.
- By default in laravel, storage file not having permission to show in the console (error shows from the error.log file).
- So the thing you need to fix is to fix compile file. which can be done thought this single command
This command will clear all your cache
- Compiled views
- Application cache
- Route cache
- Configuration cache
Use this
> php artisan optimize:clear
Solution 4 - Laravel
After changing local conf i got the same error over and over, try this, probably will help.
rm bootstrap/cache/config.php
and then
php artisan cache:clear
depending on your scenario, reloading auto-loader file can solve your issue, for that use :
composer dump-autoload
or sometimes just try :
composer install
this do the two the commands listed above.
Solution 5 - Laravel
go to your vagrant
then run
vagrant ssh
php artisan config:cache
Solution 6 - Laravel
If you are using homestead (vagrant) in Laravel then follow the steps @Farid shahidi provided
vagrant ssh
cd /home/vagrant/code <-- your file usually resides here; see your Homestead.yaml configuration
php artisan config:cache
Solution 7 - Laravel
Run the following command if you can access your server terminal
php artisan route:clear && php artisan cache:clear && php artisan config:clear && php artisan config:cache
If you are on shared hosting and cant access the terminal go to your web route file in routes/web.php
and make a temporary link such as shown:
Route::get('reset', function (){
Artisan::call('route:clear');
Artisan::call('cache:clear');
Artisan::call('config:clear');
Artisan::call('config:cache');
});
Then go to http://your-domain/reset
to execute the commands. there after you can now access your website as normal
Solution 8 - Laravel
You Have to try artisan command in this way
-
php artisan cache: clear
-
php artisan config:cache
-
php artisan cache: clear
Solution 9 - Laravel
Delete bootstrap/cache/config.php from your laravel deployment on the server.
Solution 10 - Laravel
Please run the below commands:
php artisan route:clear
php artisan config:clear
php artisan cache:clear
Solution 11 - Laravel
This one worked for me in case your project is located within /var/www/html/
sudo chmod -Rf 0777 /var/www/html/{project-name}/bootstrap/cache sudo chmod -Rf 0777 /var/www/html/{project-name}/storage
Solution 12 - Laravel
You need to run this command from the terminal.
php artisan config:clear
php artisan config:cache
Solution 13 - Laravel
This one-line command solves my issue:
php artisan config:cache
Solution 14 - Laravel
I got the same issue, I change the permissions of the folders inside the the storage folder.
chmod 777 <folder_name>
I'm not sure about this security wise. but this resolve my problem.
I change my file settings to 755
also work for me.
Solution 15 - Laravel
try this
>1. remove your "vendor" folder 2. Run "composer install" or "composer install --ignore-platform-reqs" on your cmd or terminal
- php artisan config:cache
- php artisan config:clear
- php artisan cache:clear
- php artisan route:cache
- php artisan view:clear
- php artisan config:cache
if you are using linux:
>9. service apache2 restart (just in case)
if you using xammp:
>9. just restart your xammp