Ngnix - write: permission denied when transfering files with Filezilla to root directory

StackOverflow https://stackoverflow.com/questions/21221416

Вопрос

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?

Это было полезно?

Решение

The following command finally gave me the required permissions:

sudo chown username /usr/share/nginx/www
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top