Answer the question
In order to leave comments, you need to log in
sftp access to site directories
Server on debian 6, nginx, php-fpm.
There are 12 sites on the server in the directories /home/hosting/site1,2,3, etc.
all sites under different users, the rights are 700.
There was a need to give rights to the developer so that he could upload files to the directory of one of the sites, created the user devsite1 with the home directory /home/hosting/site1, assigned a password, for chroot-til, in /etc /ssh/sshd_config wrote the following:
Match User devsite1
ChrootDirectory %h
AllowTCPForwarding no
X11Forwarding no
ForceCommand internal-sftp
The problem is that it does not connect under this user to any via SFTP (writes the Server unexpectedly closed network connection error), it connects only if the owner of the site directory /home/hosting/site1 is made the owner of root-a and the root group. Tell me how to properly organize such access and give rights so that the user devsite1 can upload files.
Answer the question
In order to leave comments, you need to log in
As far as I remember, the chroot directory must be owned by root. Make a simple nested directory and assign the user you need to it.
The directory is written with an "I". Isn't it easier to install an ISP type panel or analogues? Such leapfrog with the rights otherwise will be all the time. Either one or the other.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question