I needed to configure an FTP server on my Debian backup box due to some remote windows backup configurations. I initially edited the config files by hand with Vim, but installed a Webmin module to test too. I enabled the
virtual users option, but then decided that this wasn’t actually required as I only needed a single login for the purpose. The problem now, no user was able to login, virtual or otherwise, all I kept getting was the dreaded
530 Login incorrect message.
I looked through the config file, checked, double-checked, triple-checked, everything seemed correct. I compared it to the one running on one of my Raspberry Pis that is currently serving the purpose of a backup server, and this all tallied up too.
I naturally checked all permissions for the directories that were going to be in use and everything looked fine, so WTF had I done!? I even went as far as removing vsftpd from my server and reinstalling it again, to yet again, no effect.
I don’t have a great deal of hair, but what I do have was becoming less, until I checked one final location…
/etc/pam.d. Witihin it, I found a vsftpd file that was still trying to load virtual users that I had now removed (the virtual user file had been removed entirely). Just to make sure, I removed vsftpd again, removed the vsftpd file within the
/etc/pam.d dir and installed vsftpd again. I then copied my previous
/etc/vsftpd.conf file back again, edited
/etc/vsftpd_users again to enable my backup user and voila! Everything worketh again!
I’m far from afraid of using the cmdline to configure my servers, so this is most definitely a lesson learned. The problem seems to be that I didn’t know what files had been enabled/written when I enabled virtual users from within the Webmin module.