This is a very common but annoying problem many of us face while working with magento. Sometimes we couldn’t really figure out what exactly is the problem. But don’t panic:
*Changing the attributes/Permissions
All the FTP clients (fileZilla, cuteFTP etc) give you the option to change the file/folder attributes. Just right click on the folder and select the option change attributes/permissions. You can do it through shell also .
Command : chmod -R 777 /path/to/folder
*Changing the owner and user group of media/ folder to “www-data”
Login to linux shell and enter the following command.
Command : chown -R owner:group /path/to/folder
Example: # chown -R www-data:www-data media/