Answer the question
In order to leave comments, you need to log in
NGINX - how to give multiple users SSH access to /home/domain/www on the same domain?
Good day.
I have a Debian Jessie server with NGINX 1.8.0 installed with which I distribute static files.
Current situation:
Domain: static.domain.com
Let on server: /home/static/
Owner: ustatic:ustatic
Let on server: /home/static/www/
Owner: www-data:www-data
and all other files on the server in the /home/static/www/* directory
Problem:
If I change the ownership of the ~/www/ folder or any file in that folder, I immediately get the "NGINX 403 Forbidden" error.
Task:
My problem is that I have two folders in the ~/www/ directory, for each of which I have to create one account. So that each user via SSH / SFTP has access only to his own folder.
~/www/dirone userone
~/www/dirtwo usertwo
And at the same time, so that NGINX can safely distribute these files to static.domain.com/dirone/ and static.domain.com/dirtwo/
Answer the question
In order to leave comments, you need to log in
/home/static/www/dirone
owner: userone
group: www-data
permissions: rwxr- s ---
/home/static/www/dirtwo
owner: usertwo
group: www-data
permissions: rwxr- s ---
The only solution I found was to create directories:
/home/userone/
/home/usertwo/
and two users:
userone
usertwo
and then link:
ln -s /home/userone/ /home/static/www/userone
ln -s /home/usertwo/ /home/static/www/usertwo
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question