Permissions issues for web server

Hi, I’m using my Raspberry Pi for a lot of functionalities. Recently I’m testing 2 websites on it but I’m having some permissions issues. All websites files are in an external hard drive (that I’m using also for PLEX, Transmission, etc…) in a folder called “www” located in the root of the HDD. I created a symlink to /var/www.
I’m logging via FTP as root user that upload files with root:root ownership, the problem is that I had some permission issues because I think that all files need to be www-data:www-data to work well.
What may I need to fix it? If I change owner of all “www” files I can’t manage that via FTP client because I’m logging as root.

Thank you



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

Yes, I have to do

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

when working on website but I need to do

chown -R root:root /var/www

when working via FTP client.

The problem is that I need to change ownership every time. :thinking: