Change ownership of the  directory to ensure you have the permissions to modify files within the directory


sudo chown -R $USER:$USER /var/www/<your-directory-name>