Wednesday, October 17, 2018
Solution To: Laravel Error failed to open stream: Permission denied
PROBLEM:
Laravel Error failed to open stream: Permission denied
SOLUTION:
Most folders should be normal "755" and files, "644"
Laravel requires some folders to be writable for the web server user. You can use these command on *nix based OSs.
Using ACL
// nginx = web server user
// systemuser = your local user which you use to login via ssh
sudo setfacl -Rdm u:nginx:rwx,u:systemuser:rwx storage
sudo setfacl -Rm u:nginx:rwx,u:systemuser:rwx storage
Alternatively, if you don't have ACL
sudo chgrp -R www-data storage bootstrap/cache
sudo chmod -R ug+rwx storage bootstrap/cache
REFERENCE:
https://laracasts.com/discuss/channels/general-discussion/laravel-framework-file-permission-security
https://stackoverflow.com/questions/30639174/file-permissions-for-laravel-5-and-others
Labels:
error,
file-permission,
laravel,
php
Subscribe to:
Post Comments (Atom)
Labels
apt-get
(2)
bash
(4)
Chrome
(1)
CMS
(1)
code-igniter
(1)
codenvy
(1)
composer
(6)
eclipse che
(1)
error
(4)
file-permission
(1)
firebase
(2)
Free PHP Hosting
(11)
FuelPHP
(3)
git
(4)
jwt
(1)
laravel
(10)
mysql
(1)
OpenShift
(1)
php
(11)
PHP Eclipse
(9)
PHP Joomla
(2)
PHP Laravel
(4)
PHP Yii
(9)
PHP-JBOSS
(2)
php-jwt
(2)
PHP-Wordpress
(8)
plain php
(1)
Postman
(1)
REST
(2)
sqlite
(1)
sudo
(1)
visual-studio
(4)
xampp
(4)
ReplyDeleteHey, nice site you have here! Keep up the excellent work!
Offshore Yii Framework Development Company in India