chmod(): Operation not permitted while uploading images in laravel 5.6 at localhost. Enabled GD library. Testing environment is with ubuntu 16.04 with Windows 10. Any help?
If this is test environment, why not give full permission to whatever your laravel installation director?
Assign 777 permission in Ubuntu:
$sudo chmod 777 -R /var/www/laravel-installation-folder
In windows you can change the file permission by going to www directory
- Right click the directory where laravel is installed
- Select Properties
- Security Tab
- Select the user
- Edit
- Give full previllege
- Save
Remember, in production server you must follow Laravel directory permission and also give RW permission to Public or the file upload directory
Verify that the apache service user has access to your application folder.
Try:
chown -R www-data /var/www/laravel-project
wherever www-data is user running the service apache2