“laravel Permission denied’ in /opt/bitnami/apache2/”

Error on aws server bitnami when trying to deploy

b10cca3d3df03aa33c020624e9d1acd3

Fatal error: Uncaught exception ‘UnexpectedValueException’ with message ‘The stream or file “/opt/bitnami/apache2/htdocs/back-end/storage/logs/laravel-2015-10-03.log” could not be opened: failed to open stream: Permission denied’ in /opt/bitnami/apache2/htdocs/back-end/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:87 Stack trace: #0 /opt/bitnami/apache2/htdocs/back-end/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php(88): Monolog\Handler\StreamHandler->write(Array) #1 /opt/bitnami/apache2/htdocs/back-end/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(37): Monolog\Handler\RotatingFileHandler->write(Array) #2 /opt/bitnami/apache2/htdocs/back-end/vendor/monolog/monolog/src/Monolog/Logger.php(289): Monolog\Handler\AbstractProcessingHandler->handle(Array) #3 /opt/bitnami/apache2/htdocs/back-end/vendor/monolog/monolog/src/Monolog/Logger.php(565): Monolog\Logger->addRecord(400, ‘exception ‘Unex…’, Array) #4 /opt/bitnami/apache2/htdocs/back-end/vendor/laravel/framework/ in/opt/bitnami/apache2/htdocs/back-end/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php on line 87

Fatal error: Uncaught exception ‘UnexpectedValueException’ with message ‘The stream or file “/opt/bitnami/apache2/htdocs/back-end/storage/logs/laravel-2015-10-03.log” could not be opened: failed to open stream: Permission denied’ in /opt/bitnami/apache2/htdocs/back-end/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:87 Stack trace: #0 /opt/bitnami/apache2/htdocs/back-end/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php(88): Monolog\Handler\StreamHandler->write(Array) #1 /opt/bitnami/apache2/htdocs/back-end/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(37): Monolog\Handler\RotatingFileHandler->write(Array) #2 /opt/bitnami/apache2/htdocs/back-end/vendor/monolog/monolog/src/Monolog/Logger.php(289): Monolog\Handler\AbstractProcessingHandler->handle(Array) #3 /opt/bitnami/apache2/htdocs/back-end/vendor/monolog/monolog/src/Monolog/Logger.php(565): Monolog\Logger->addRecord(400, ‘exception ‘Symf…’, Array) #4 /opt/bitnami/apache2/htdocs/back-end/vendor/laravel/framework/ in/opt/bitnami/apache2/htdocs/back-end/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php on line 87

d7fe28421662da0d0a007aac14e50f52

http://qaseeker.com/28929018-allowing-permissions-for-rails-on-bitnami-google-compute-engine/

sudo chown -R bitnami:daemon /opt/bitnami/apache2/htdocs/back-end
sudo chmod -R g+r /opt/bitnami/apache2/htdocs/back-end

or specific log files:
sudo chown -R bitnami:daemon /opt/bitnami/apache2/htdocs/back-end/storage/logs/*

nearly there…

“linux new file permissions default”

sudo chmod -R g+rwxs /opt/bitnami/apache2/htdocs/back-end

b756c820799c1a17eebed1dc85eb5a07

WORKED!!!

didnt work.

Sam Deering is a web developer from England (currently living in Australia). In his spare time he enjoys coding, playing chess, reading and investing.

Leave a Reply

Your email address will not be published. Required fields are marked *