GodziLaravel
1 month ago
312
8
Laravel

How add permission to storage directory ?

Posted 1 month ago by GodziLaravel

Hello ,

After cloning my project and composer install, I had the 500 error message ,

the error log is :

[Wed May 27 19:40:45.218748 2020] [php7:error] [pid 81545] [client ::1:40066] PHP Fatal error:  Uncaught ErrorException: file_put_contents(/var/www/coorza/storage/framework/views/c66f67b88a20240670a501b10fd9bb23cb42ab55.php): failed to open stream: Permission denied in /var/www/coorza/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:133\nStack trace:\n#0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError()\n#1 /var/www/coorza/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(133): file_put_contents()\n#2 /var/www/coorza/vendor/laravel/framework/src/Illuminate/View/Compilers/BladeCompiler.php(150): Illuminate\Filesystem\Filesystem->put()\n#3 /var/www/coorza/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php(51): Illuminate\View\Compilers\BladeCompiler->compile()\n#4 /var/www/coorza/vendor/facade/ignition/src/Views/Engines/CompilerEngine.php(37): Illuminate\View\Engines\CompilerEngine->get()\n#5 /var/www/coorza/vendor/laravel/framework/src/Illuminate/View/View.php(139): Facade\Ignition\Views\Engines\CompilerEngine->get()\n#6 /va in /var/www/coorza/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php on line 133

I thinks it's a permission issue ,

here the files :

total 928
drwxr-xr-x 14 root     root       4096 Mai 27 19:56 ./
drwxrwxrwx  4 root     root       4096 Mai 27 19:11 ../
drwxr-xr-x  6 www-data www-data   4096 Mai 27 19:11 app/
-rw-r--r--  1 www-data www-data   1686 Mai 27 19:11 artisan
drwxr-xr-x  3 www-data www-data   4096 Mai 27 19:11 bootstrap/
-rw-r--r--  1 www-data www-data   1729 Mai 27 19:11 composer.json
-rw-r--r--  1 www-data www-data 242693 Mai 27 19:11 composer.lock
drwxr-xr-x  2 www-data www-data   4096 Mai 27 19:11 config/
drwxr-xr-x  5 www-data www-data   4096 Mai 27 19:11 database/
-rw-r--r--  1 root     root        220 Mai 27 19:11 .editorconfig
-rw-r--r--  1 root     root        778 Mai 27 19:11 .env
-rw-r--r--  1 root     root        275 Mai 27 19:11 .eslintrc.js
drwxr-xr-x  8 root     root       4096 Mai 27 19:11 .git/
-rw-r--r--  1 root     root        111 Mai 27 19:11 .gitattributes
-rw-r--r--  1 root     root        163 Mai 27 19:11 .gitignore
drwxr-xr-x  4 root     root       4096 Mai 27 19:11 .idea/
-rw-r--r--  1 www-data www-data   1693 Mai 27 19:11 package.json
-rw-r--r--  1 www-data www-data 587785 Mai 27 19:11 package-lock.json
-rw-r--r--  1 www-data www-data   1197 Mai 27 19:11 phpunit.xml
drwxr-xr-x  6 www-data www-data   4096 Mai 27 19:33 public/
-rw-r--r--  1 www-data www-data   4497 Mai 27 19:11 README.md
drwxr-xr-x  6 www-data www-data   4096 Mai 27 19:11 resources/
drwxr-xr-x  2 www-data www-data   4096 Mai 27 19:11 routes/
-rw-r--r--  1 www-data www-data    563 Mai 27 19:11 server.php
drwxrwxrwx  5 www-data www-data   4096 Mai 27 19:11 storage/
-rw-r--r--  1 root     root        174 Mai 27 19:11 .styleci.yml
drwxr-xr-x  4 www-data www-data   4096 Mai 27 19:11 tests/
drwxr-xr-x 53 www-data www-data   4096 Mai 27 19:27 vendor/
-rw-r--r--  1 www-data www-data    852 Mai 27 19:11 webpack.mix.js

Please sign in or create an account to participate in this conversation.