1

I tried everything but not getting any solution. I am trying to make a project in laravel. I created the migration file but after writing php artisan migrate. I am getting the following error.

Here is Error pic

enter image description here

rajat thakur
  • 17
  • 1
  • 5

3 Answers3

1

You have to change the storage directory permission (as you have tried). It seems you have entered incorrect password.

Rouhollah Mazarei
  • 3,969
  • 1
  • 14
  • 20
0

You probably get a Laravel error just before this one and the right on the error file is for apache. And for this error the right for the file should be for the user interface.

Here are command to set up special permission on all cache and storage directories.

$ sudo chown -R `whoami`:`whoami` /var/www/[site_name]
$ sudo chmod 775 -R /var/www/[site_name]
$ cd /var/www/[site_name]
$ sudo setfacl -R -m u:www-data:rwX -m u:`whoami`:rwX storage bootstrap/cache
$ sudo setfacl -dR -m u:www-data:rwx -m u:`whoami`:rwx storage/ bootstrap/cache/`

www-data is your apache or ngix user which runs webservice

Frédéric Klee
  • 145
  • 1
  • 9
-1

First, try the below commands and then run the artisan command again.

php artisan cache:clear

php artisan config:cache 

php artisan config:clear
Yugma Patel
  • 529
  • 3
  • 9