Skip to content

Marc

My feedback

1 result found

  1. 73 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    An error occurred while saving the comment
    Marc commented  · 

    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

    Marc supported this idea  · 

Feedback and Knowledge Base