As root, or someone with root privileges. Go to var then enter 'chown -R user:user www'. If you want root to be able to access www enter 'chown -R root:root www'. This will make sure that root has access to the files.
Enter 'chmod -R 777 /var/www' to change the permissions of the files.