I have some difficulties with logging on to vsftpd. I think it's more related to user/folder permissions, but it might be something else as well.
I'm running OS X 10.4 (8.11.1 Darwin Kernel), so please disregard the specific locations (opt/local/etc instead of /etc).
As the config is a little bit complicated, I will explain what I am looking for. I have two users which should connect to the server, each one receiving a special location to download/upload only his own files. No anonymous connections are accepted. All connections from 127.0.0.1 only at this time.
Users are 'bogdan' and 'bogdan2'. I wanted each one of the users to have its own folder in /Users/ftp, so I mkdir /Users/ftp/bogdan and /Users/ftp/bogdan1
These are the config lines/files. I marked the path with bold and the file content with italics.
vsftpd : 127.0.0.1 : allow
Comment: username and passwords, prepared with db_load (Berkeley).
auth required /lib/security/pam_userdb.so db=/opt/local/etc/vsftpd_login
account required /lib/security/pam_userdb.so db=/opt/local/etc/vsftpd_login
ftpd_banner=Welcome to my ftp server.
echo "write_enable=YES" > /opt/local/etc/vsftpd_user_conf/bogdan
echo "local_root=/Users/ftp/bogdan" > /opt/local/etc/vsftpd_user_conf/bogdan
echo "download_enable=YES" > /opt/local/etc/vsftpd_user_conf/bogdan
echo "dirlist_enable=YES" > /opt/local/etc/vsftpd_user_conf/bogdan
echo "chroot_local_user=YES" > /opt/local/etc/vsftpd_user_conf/bogdan
Comment: user 'bogdan' gets privileges on a per user basis.
echo "write_enable=YES" > /opt/local/etc/vsftpd_user_conf/bogdan2
echo "local_root=/Users/ftp/bogdan2" > /opt/local/etc/vsftpd_user_conf/bogdan2
echo "download_enable=YES" > /opt/local/etc/vsftpd_user_conf/bogdan2
echo "dirlist_enable=YES" > /opt/local/etc/vsftpd_user_conf/bogdan2
echo "chroot_local_user=YES" > /opt/local/etc/vsftpd_user_conf/bogdan2
Comment: user 'bogdan2' gets privileges on a per user basis.
I tried to login using the credentials from
vsftpd_login.db file, but it didn't work: "530 Login incorrect."
I also created the same users with the same passwords on localhost, changes the home directory to /Users/ftp/bogdan, given the GID 52 ftp-users with Netinfo manager. The same result.
My guess is that something is wrong with the way users and passwords are created and permissions are set, but it might be something else as well.