I have a problem writing on /var/www/html/app/public/upload/ on linux server and also I got this error when execute chown "changing ownership o/var/www/html/app/public/upload/: Operation not permitted"
Asked
Active
Viewed 292 times
0
-
check this link: https://stackoverflow.com/questions/34836602/laravel-uploading-file-unable-to-write-in-directory – Pejman Kheyri Mar 03 '21 at 17:06
1 Answers
0
you need to give read and write permissions to the webserver for storage, cache, and any other directories the webserver needs to upload or write to (depending on your situation), so run the following commands(from the project working directory)
sudo chgrp -R www-data storage bootstrap/cache
sudo chmod -R ug+rwx storage bootstrap/cache
and also if you are using a storage link then don't forget to run the following command
php artisan storage:link

Sachin Kumar
- 3,001
- 1
- 22
- 47