Merhaba, image upload işlemi yapmaya çalışıyorum fakat böyle bir hata alıyorum. Daha önceden çalışıyordu image'lerin kaydolduğu dosyayı temizleyince bu hatayı almaya başladım. Forumlarda çözüm olarak söylenen bir çok yöntem denedim fakat çözemedim.
Image dosyalarını app/public klasörü altına ekliyorum.
Hata:
file_put_contents(/var/www/myfile/public/public/images/1/main.jpg): failed to open stream: Permission denied
Ubuntu 20.0 ve nginx kullanıyorum.
Denediğim yöntemler:
- php artisan config:cache
- php artisan cache:clear
- sudo chmod -R a+rwx
- sudo chgrp www-data storage -R
- sudo chmod g+rwx storage -R
- sudo setfacl -R -d -m g::rwx storage
- sudo chmod -R 0755
- bootstrap/cache/config.php dosyasını silme