Image is not uploading digitalocean website?

Imgage is not uploading in cs cart website hosted on digitalocean droplet.

It is a permission issue for root folder. You need to give permission 

to your user to read and write so that image can be uploaded as well 

as read from folders to display on front end. To resolve the issue 

you need to execute some commands which are listed below and try to 

execute in same sequence. Login to your server execute below commands:

 

- ps aux | grep apache

- groups www-data

- chown -R www-data:www-data /var/www/

- chmod -R 775 /var/www/

- usermod -a -G www-data root ( root Your user name )

WARNING! do not forget -a switch this way you append new group to existing list and not replace old groups list with new one.

- echo unmask 002 >> /etc/apache2/envvars

- service apache2 restart

Once executed above commands successfully, it will resolve your image upload issue.