Marc
My feedback
1 result found
-
75 votes
Thank you for your input! We will consider this functionality in upcoming releases if it will be popular.
Everyone, please continue voting for this feature if you consider it important.
— AY
An error occurred while saving the comment Marc supported this idea ·
Yes, think also it's an essential requirement.
Notice that you can implement that by editing the ssh_config:
1) create an FTP account (eg. myftpuser) for your domain with /httpdocs/ for home directory
2) edit /etc/ssh/sshd_config (replace the Subssytem line) :
# Subsystem sftp /usr/lib/openssh/sftp-server -f AUTH -l INFO
Subsystem sftp internal-sftp -f AUTH -l INFO
3) Create /etc/ssh/sshd_config.d/sftp.conf with the following content :
Match User myftpuser
ChrootDirectory /var/www/vhosts/{domain}/httpdocs
ForceCommand internal-sftp
AllowTcpForwarding no
X11Forwarding no
4) Notice that ChrootDirectory must be owned by root for this to work:
chown root:psaserv /var/www/vhosts/{domain}/httpdocs
chmod 755 /var/www/vhosts/{domain}/httpdocs
Hope this helps