Accee Wordpress Directory

Hello,

Can anyone know any alternate way to access the wordpress folder thru ftp and upload files. I know the fact i have to give root access in order to access the wordpress directory.

I am currently doing this way

sudo chown -R user:user /var/lib/docker/volumes and later after editing i change it back to
sudo chown -R www-data:www-data /var/lib/docker/volumes

Is there anyway because if i do the above the database permissions for global-db which is in the volumes folder are also getting changed.