Home DirectAdmin, Server • Fix ProFTPd [unable to lstat AuthUserFile] error on DirectAdmin

Fix ProFTPd [unable to lstat AuthUserFile] error on DirectAdmin


Recently I’ve updated the ProFTPd software on one of the servers at work and ran into the following issue after custombuild finished the update:
Restarting ProFTPd.
Shutting down proftpd: [ OK ]
Starting proftpd: 2016-06-10 10:12:35,133 server.example.net proftpd[3367]: mod_auth_file/1.0: unable to lstat AuthUserFile '/usr/local/directadmin/data/users/morpheus/ftp.passwd': No such file or directory
2016-06-10 10:12:35,134 server.example.net proftpd[3367]: fatal: AuthUserFile: unable to use /usr/local/directadmin/data/users/morpheus/ftp.passwd: No such file or directory on line 4 of '/etc/proftpd.vhosts.conf'

The issue here is that the ProFTPd server no longer accepts the vhost config file but still parses it (hence the error above). So the real problem is that there is a user “morpheus” on the server (in my case) which has it’s own vhost config in the ProFTPd service but for that user the password file was not present anymore.

Upon looking into the vhost configuration file of ProFTPd learned me that there was indeed a manual created vhost section for the user “morpheus”:

bash-3.00# cat /etc/proftpd.vhosts.conf
ServerName "ProFTPd"
ExtendedLog /var/log/proftpd/ WRITE,READ userlog
AuthUserFile /usr/local/directadmin/data/users/morpheus/ftp.passwd

This itself isn’t an issue as long as the ftp.passwd file for the user exists. When examining this further I found out that the user “morpheus” didn’t exist on the server anymore! So here it was actually pretty clear why the error showed up as the given ftp.passwd didn’t exist anymore because the user was removed from the system in the past but the vhost config was not properly cleaned.

To solve it in one go we can simply move away the vhost configuration file of ProFTPd to a safe location (as it’s deprecated now anyway):
bash-3.00# mv /etc/proftpd.vhosts.conf /root/

After moving the file out of the way start ProFTPd again and you should see no errors and the service should be reachable again:
bash-3.00# /etc/init.d/proftpd restart
Shutting down proftpd: [FAILED]
Starting proftpd: [ OK ]

Author:Jeffrey Langerak

Leave a Reply

Your email address will not be published. Required fields are marked*



This site uses Akismet to reduce spam. Learn how your comment data is processed.