On a Debian Wheezy 64bit, I create a new user for a customer to place files into a directory. After the user is created, I take away his interactive login by replacing /bin/bash
with /bin/false
in /etc/passwd
. Then I add him to /etc/ftpchroot
, so that his session will be chrooted to his home directory.
However, as soon as I add the user to /etc/ftpchroot
, when the user logs in, he cannot see any files. The user is chrooted, he cannot traverse upwards. He can upload files, which are stored in the correct directory, and with 640 permissions and thatuser:thatusersgroup ownership.
My thoughts so far:
/etc/ftpchroot
is clearly doing something, and doing, what it should do.- Any user created on that machine have this problem (tried twice with other new users)
- It's not directory dependent. Altering his home directory and chrooting to there shows the same problem.
It's strange to me as I have done this quite a few times before, and I have never encountered this. Sadly, googling for an answer is difficult for it's problematic problem description.
Edit 1: Something I'm seeing now. Logging in while under ftpchroot, no message is displayed when the login successfully completes. However, logging in without ftpchroot, /etc/motd
is displayed after completing the authentication.
Edit 2: I've kinda worked around the problem by installing inetutils-ftpd
. It brought along PAM authentication, and after configuring that, it logs in the very same user without the mentioned problem, and he can upload and see his files with no problem.