Laravel uploading file Unable to write in directory

chmod 755 /var/www/html/public/system and chown www-data:www-data /var/www/html/public/system as stated by @JLPuro works perfectly. Thanks a lot guys.


if you are using Centos-7 Then use

sudo find directory_name -type f -exec chmod 644 {} \;
sudo find directory_name -type d -exec chmod 775 {} \;

sudo chown -R apache:apache var/www/html/directory_name
chcon -R -t httpd_sys_rw_content_t directory_name

Where directory_name is the main directory of you Project.


permission for folder sudo chmod 777./(folder name)

for file sudo chmod 777 -R ./(file name)