I've created a user ftp_user and then i restricted its access to /var/www/html/folder. It worked just fine but then i found out that i could connect trough ssh using Putty with that ftp_user and its password.

Reading a little bit i came across some articles and one of them suggested to use this command:

root@server:~# usermod -s /sbin/nologin ftp_user

The problem is that after using this command when i try to connect trough ftp i'm getting this error:

530 Login incorrect.

So i did a little bit of research and came across an article that suggested to use this two commands:

root@server:~# usermod -s /etc/shells ftp_user
root@server:~# usermod -s /bin/false ftp_user

But i still get the 530 Login incorrect. response.

I'm using a digital ocean vps that runs Ubuntu 14.04.1.

  • Do you HAVE to use FTP? This is 2018. SCP is much better and easier.
    – LawrenceC
    Oct 26, 2018 at 12:10
  • 1
    a tech support asked me for access trough ftp so ... not my choice, i would use ssh anytime :)) Oct 26, 2018 at 14:04

1 Answer 1


I suppose that in order for the chroot to work you need to have a valid shell. If you really need the chroot you can block access via ssh and password with this option in the openssh config file:

DenyUsers ftp_user

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.