简体   繁体   中英

Laravel Forbidden You don't have permission to access /storage/ on this server

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM