I am encountering a permission error in Laravel. Any suggestions? - laravel-5

This is the error:
file_put_contents(/var/www/html/{project_name}/public/temp/ttfontdata/dejavuserifcondensed.mtx.json): failed to open stream: Permission denied.

Related

Bitbucket pipeline Permission denied with Laravel log file

Trying to run tests in Laravel in Bitbucket pipeline, but seems that once it fails, it tries to log the error into logs, and log file is not accessible
Bitbucket pipelines:
script:
- apt-get update && apt-get install -yqq unzip git
- curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
- composer install --prefer-dist --no-ansi --no-interaction --no-progress --no-scripts --no-suggest --ignore-platform-req=ext-mongodb
- cp .env.pipelines .env
- export DOCKER_COMPOSE_VERSION=1.18.0
- export DOCKER_COMPOSE_URL=https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)
- curl -L $DOCKER_COMPOSE_URL > docker-compose
- chmod +x docker-compose
- mv docker-compose /usr/local/bin
- rm docker-compose.yml
- cp docker-compose-bitbucket-pipeline.yml docker-compose.yml
- ./vendor/bin/sail up -d
- ./vendor/bin/sail artisan key:generate
Error:
he stream or file "/var/www/html/storage/logs/laravel-2022-07-06.log" could not be
opened in append mode: failed to open stream: Permission denied\n
The exception occurred while attempting to log: The stream or file "/var/www/html/storage/logs/laravel-2022-07-06.log" could not be opened in append mode: failed to open stream: Permission denied\n
The exception occurred while attempting to log: The stream or file "/var/www/html/storage/logs/laravel-2022-07-06.log" could not be opened in append mode: failed to open stream: Permission denied\n
The exception occurred while attempting to log: The stream or file "/var/www/html/storage/logs/laravel-2022-07-06.log" could not be opened in append mode: failed to open stream: Permission denied\n
The exception occurred while attempting to log: The stream or file "/var/www/html/storage/logs/laravel-2022-07-06.log" could not be opened in append mode: failed to open stream: Permission denied\n
The exception occurred while attempting to log: The stream or file "/var/www/html/storage/logs/laravel-2022-07-06.log" could not be opened in append mode: failed to open stream: Permission denied\n
The exception occurred while attempting to log: The stream or file "/var/www/html/storage/logs/laravel-2022-07-06.log" could not be opened in append mode: failed to open stream: Permission denied\n
The exception occurred while attempting to log: The stream or file "/var/www/html/storage/logs/laravel-2022-07-06.log" could not be opened in append mode: failed to open stream: Permission denied\n
The exception occurred while attempting to log: The stream or file "/var/www/html/storage/logs/laravel-2022-07-06.log" could not be opened in append mode: failed to open stream: Permission denied\n
The exception occurred while attempting to log: The stream or file "/var/www/html/storage/logs/laravel-2022-07-06.log" could not be opened in append mode: failed to open stream: Permission denied\n
The exception occurred while attempting to log: The stream or file "/var/www/html/storage/logs/laravel-2022-07-06.log" could not be opened in append mode: failed to open stream: Permission denied\n
The exception occurred while attempting to log: The stream or file "/var/www/html/storage/logs/laravel-2022-07-06.log" could not be opened in append mode: failed to open stream: Permission denied\n
The exception occurred while attempting to log: The stream or file "/var/www/html/storage/logs/laravel-2022-07-06.log" could not be opened in append mode: failed to open stream: Permission denied\n
The exception occurred while attempting to log: The stream or file "/var/www/html/storage/logs/laravel-2022-07-06.log" could not be opened in append mode: failed to open stream: Permission denied\n
The exception occurred while attempting to log: The stream or file "/var/www/html/storage/logs/laravel-2022-07-06.log" could not be opened in append mode: failed to open stream: Permission denied\n
The exception occurred while attempting to log: The stream or file "/var/www/html/storage/logs/laravel-2022-07-06.log" could not be opened in append mode: failed to open stream: Permission denied\n
The exception occurred while attempting to log: Customer paid successfully\n
Test body:
$testCase->postJson(
'api/v1/stripe/webhook',
$payload,
$this->getHeadersWithAuthorization($payload)
);
Do you know how to fix it? Looks like I need to make storage folder is accessible and writable. But 'chmod -R 777 storage' in bitbucket pipelines doesn't help

How do I set xampp?

I am getting this error while setting up xampp.
Error says "Could not drop existing database
SQL: Access denied for user ''#'localhost' to database 'dvwa'."
I got the error while trying to create a database. I have tried editing the config file too. Whats happening?
it's a problem with the permission to the user local : you have to go with the user root.
this post could help you : ERROR 1044 (42000): Access denied for user ''#'localhost' to database 'db'

FIle could not be opened in append mode: failed to open stream: Permission denied

I am trying to start server of larvel, but I found this:
"The stream or file "C:\Users\pa\storage\logs/laravel-2020-12-07.log" could not be opened in append mode: failed to open stream: Permission denied".
What should i do now ?? i am using windows platform.

The stream or file "/Applications/XAMPP/xamppfiles/htdocs/apcjobs/storage/logs/laravel-2020-06-06.log" could not be opened:

full error: The stream or file "/Applications/XAMPP/xamppfiles/htdocs/apcjobs/storage/logs/laravel-2020-06-06.log" could not be opened: failed to open stream: Permission denied
Does anybody know why do I get this error?
I have a Mac, and I have transfered a project from windows

filebeat - permission denied errors on Ubuntu 18.04

I am facing the following error while running filebeat
$ filebeat test config
2019-03-20 01:57:12.112399037 +0000 UTC m=+0.016941991 write error: failed to open new file: open /var/log/filebeat/filebeat: permission denied
2019-03-20 01:57:12.112659642 +0000 UTC m=+0.017202599 write error: failed to open new file: open /var/log/filebeat/filebeat: permission denied
Exiting: Beat meta file failed to open: open /var/lib/filebeat/meta.json: permission denied
Does anyone know how to fix it ?
sudo filebeat test config
Above command should work, provided the owner of the file is root.

Resources