We can add permission in Linux operating system by using below commands on your directory:-
chown -R www-data:www-data /var/www/html/uplods/ur_folder
chmod 755 -R /var/www/html/uploads/ur_folder
Write above both command one by one add permission to your directory in linux ubuntu.
To allow userĀ ec2-user
write access to the public web directory (/var/www/html),
enter this command via Putty or Terminal, as the root userĀ sudo
:
sudo chown -R ec2-user /var/www/html
Make sure permissions on that entire folder were correct:
sudo chmod -R 755 /var/www/html