I have my project created with adminlte template, when i deploy my project i tried it to run without php artisan serve command but i failed i tried this options but all of my design gone away and nothing work as it was before,
This is the error a got when I wrote localhost/akyo/public
The stream or file `
"/opt/lampp/htdocs/akyo/storage/logs/laravel.log" could not be opened:
failed to open stream: Permission denied`
I tried the following options
sudo chmod -R 777 storage
sudo chmod -R 777 bootstrap/cache
sudo chmod -R 777 app/storage
Any one with a way how to fix this
try sudo chmod -R 777 storage/
Related
Yes I know this question has been asked several times but I couldn't find 100% working solution yet. I have installed XAMPP from https://www.apachefriends.org and then I installed Laravel 7 using composer command composer create-project --prefer-dist laravel/laravel:^7.0 blog
Command "php artisan serve" successfully runs the project. BUT if I open the same project from URL "http://localhost/blog/public/" I get the error:
The stream or file
"/Applications/XAMPP/xamppfiles/htdocs/blog/storage/logs/laravel.log"
could not be opened in append mode: failed to open stream: Permission
denied
I cannot set folder permission to 777 because not a good approach. The permission is already "read&write". I have been following this thread.
sudo chown -R $USER:www-data storage
sudo chown -R $USER:www-data bootstrap/cache
and then
chmod -R 775 storage
chmod -R 775 bootstrap/cache
and if it won't work, try changing the 'www-data' group into '_www'.
recently, i deploy my laravel project to Centos 7 VPS
and i have images that saved in storage file
when i'm trying to access the images using URL i got this
Forbidden
You don't have permission to access /storage/companies/1597187294.jpg on this server.
i think it something related to permissions cause everything works fine in localhost
So, any ideas to fix this ??
Try to run below command
sudo chmod -R 775 /storage
or
run these blow commands step by step
sudo chown -R $USER:www-data storage
sudo chown -R $USER:www-data bootstrap/cache
chmod -R 775 storage
chmod -R 775 bootstrap/cache
chmod -R 775 public
I am trying to run an existing Laravel project on my localhost but when I try to run the dam thing I get this error:
The stream or file "/storage/logs/laravel.log" could not be opened:
failed to open stream: Permission denied
I have tried the following:
chmod -R 775 storage and chmod -R 777 storage
Still nothing, I have even tried to do chgrp -R www-data my-project and I get this error in terminal
chgrp: www-data: illegal group name
What am I doing wrong?
Navigate to the project directory and run
sudo chmod -R 777 storage/*
This is my solution.
First you need to run php artisan cache:clear from the project directory, then chmod -R 777 app/storage and finally composer dump-autoload and now it will be working fine..
illegal group name actually means that the group you're specifying(after www-data going username).You need to either create the group, stop specifying a group, or specify a group that exists.
I am trying to generate email but getting this error:
fopen(/tmp/4701021fcbc23c3a52dde64ccca28857/body): failed to open
stream: Permission denied
Relevant user/group have the permissions but its not working. I used lot of links but none is working.
We are running apache server on linux Ubuntu 14.04.4 LTS and using laravel framework.
Try running this commands in the console, is very important to execute them from your project root directory, if you don't it won't find the specific laravel commands:
cd your_project_path
php artisan cache:clear
chmod -R 777 app
chmod -R 777 storage
composer dump-autoload
I found a similar problem in the laravel.io/forum with further information.
Set up write permissions on storage directory inside your Laravel project directory:
chmod -R 777 storage
You need to access your Laravel project folder so you can run the following command
sudo chmod 777 -R 'your path to project'
Of course you have to replace 'your path to project' with the address of your project folder
for example /var/www/html/LaravelNiceProject
thats it
You can try to write command below to grant your apache user needed privileges:
chown www-data -R storage
Regards dear
Recently I made an account in AWS. I'm using their EC2 with Ubuntu. I installed my Laravel project and in the command-line wrote chmod -R 777 storage. Now i'm getting an error:
ErrorException in Filesystem.php line 81: file_put_contents(/var/www/html/BlueDrive/bluedrive/drive/bootstrap/cache/services.json): failed to open stream: Permission denied
What should I do to prevent this exception?
This is an access permission problem.
Run the following command:
$ sudo chown nobody /var/www/html/BlueDrive/bluedrive/drive/bootstrap/
$ sudo chmod -R 0755 /var/www/html/BlueDrive/bluedrive/drive/bootstrap/
OR
run
chmod -R 777 /path/to/the/folder
go to the root of your project and
cd into the bootstrap directory. and issue chmod -R 777 .
Remember the storage directory is different from the bootstrap directory.
Laravel create a file name services.json inside boostrap/cache to list all your service providers in your application. laravel will need permission to do so that is why you are seeing that error.