nginx needs read access only, so you can safely chown
the directory to your FTP user. However, that won’t be as secure because your password is sent as plaintext over the internet when you use FTP — consider using SFTP instead 🙂.
sudo chown -R youruser:youruser /var/www
If you’re running a web application that needs write access to a specific directory, you will need to change the said directory’s group ownership to www-data
and set group write permissions:
sudo chgrp -R www-data /var/www/directory
sudo chmod -R g+w /var/www/directory