Question

I am trying to transfer files with Filezilla to the root directory (/usr/share/nginx/www) of my nginx VPS via SFTP. The data-transfer fails with the following error-message:

/usr/share/nginx/www/test.php: open for write: permission denied

I am not using the root user, but created a user with sudo-rights to access my server.

I already tried to get www-data group permissions for my user with the following commands, however, without success:

sudo newgrp www-data

sudo usermod -a -G www-data myuser

Any idea how to get write permissions to transfer my files?

Was it helpful?

Solution

The following command finally gave me the required permissions:

sudo chown username /usr/share/nginx/www
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top