Issues with SFTP only users

edited September 2020 in Help


I'm trying to configure new users with "/var/www/html" sftp only access in One Click LAMP (Ubuntu 18.04), but it doesn't work.


bad ownership or modes webroot for chroot directory "/var/www/html"

I already tried:

sudo chgrp -R www-data /var/www/html
sudo find /var/www/html -type d -exec chmod g+rx {} +
sudo find /var/www/html -type f -exec chmod g+r {} +

sudo chown -R USER /var/www/html/
sudo find /var/www/html -type d -exec chmod u+rwx {} +
sudo find /var/www/html -type f -exec chmod u+rw {} +

nano /etc/ssh/sshd_config:

Subsystem sftp internap-sftp
Match user USER
    ChrootDirectory /var/www/html
    ForceCommand internal-sftp
AllowTcpForwarding no

Can you help me, please?


Sign In or Register to comment.