I have a ubuntu 18.04 server running on GCP (nginx+php7). I've setup a directory /var/www/mysite.com which is drwxr-xr-x www-data:www-data. public_html/ is also drwxr-xr-x www-data:www-data.
I'm using the following command to try to rsync the files to the directory (for automated deployment):
rsync -azvp test/ me@xx.xxx.xxx.xxx:/var/www/mysite.com/public_html/test/
However, when I do this, I get the following error:
rsync: mkdir "/var/www/mysite.com/public_html/test" failed: Permission denied (13)
I've checked groups of the me user and it is part of the www-data group.
Why am I still getting permission denied even though i'm part of the www-data group? I'm starting to wonder if I'm even using the correct group for what i'm trying to do.
Thanks for any help!