Well, I hope this helps out someone else. I’ve been beating my head against the wall on and off for several days on it. I’m working on an embedded ARM platform from Technologic Systems, a TS-7200. I have it set up to boot a Debian build from a compact flash card. This is my first experience with both embedded ARM and Debian. So far, both ROCK.. but I digress.
One of the things I needed to do was get an FTP installation working so I could send stuff to the board. Apt-get did a fantastic job of getting and installing Proftpd and I had the daemon up and running in like five minutes. So far so good. Until I tried to log in.
Nada. Damn.
Endless searches and configuration changes and log checks did me no good. For a while in fact, I wasn’t even getting a log at all. Turns out the default setup doesn’t include logging. They don’t do a good job of telling you that either. My log setup is:
# Logging formats
LogFormat default “%h %l %u %t \”%r\” %s %b”
LogFormat auth “%v [%P] %h %t \”%r\” %s”
LogFormat write “%h %l %u %t \”%r\” %s %b”
# activate logging
# every login
ExtendedLog /var/log/ftp_auth.log AUTH auth
# file/dir access
ExtendedLog /var/log/ftp_access.log WRITE,READ write
# forr paranoid (big logfiles!)
ExtendedLog /var/log/ftp_paranoid.log ALL default
Yes I know it’s probably overkill, but this will be for low volume use, so I don’t care if the logs have big entries. There won’t be many. That fixed my logging problem. It didn’t get me logged in though. After what was probably endless hours of searching, I found this post:
http://raetsel.wordpress.com/2007/03/28/proftpd-shells-and-nobody/
Turns out that my problem was the “gotcha” he mentions first. If you are using actual system users for FTP (as opposed to virtual users) you need to be sure the shell is set properly. Apparently when you adduser it isn’t. It requires use of chsh to set to a valid shell in order to log in. I set my user to /bin/bash and voila! If you’re not sure what the shell is for the user you want to use, check out /etc/passwd. Its the last field in the entry. If there is a setting there (unlike mine which was blank) and it still doesn’t work, make sure that the shell that is assigned is actually a valid one (my first attempt was bin/bash not /bin/bash which didn’t work either).
If you have assigned a shell that is proper then you can next check /etc/shells to make sure that the one you’ve assigned is a valid login shell. I didn’t need to. Your mileage may vary (YMMV). If this helps you, please feel free to leave a comment to that effect.
I hate computers. Never do what you want them to do, only what you tell them to do.