Cannot Add FTP Users

Alright,

Well, after searching for like a few hours what this problem is, I have found something silly, and it looks like a bug. Here is the config layout:

/etc/proftpd.conf
Code:
ServerName              "ProFTPd"
ServerType              standalone

Port                    21
UseReverseDNS           off
TimeoutLogin            120
TimeoutIdle             600
TimeoutNoTransfer       900
TimeoutStalled          3600

ScoreboardFile                  /var/run/proftpd/proftpd.pid

TransferLog             /var/log/proftpd/xferlog.legacy
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"

#DON'T modify this log format.  Its used by DirectAdmin to determine user usage
LogFormat               userlog "%u %b"
ExtendedLog             /var/log/proftpd/0.0.0.0.bytes WRITE,READ userlog

AuthUserFile                    /etc/proftpd.passwd
DefaultServer           on

TimesGMT off
PassivePorts 49152 65534

<Global>
        DeferWelcome            on

        RequireValidShell       no

        DefaultRoot             ~
        DirFakeUser on ftp
        DirFakeGroup on ftp

        User                    ftp
        Group                   ftp
        #UserAlias              anonymous ftp

        AllowStoreRestart       on
        AllowRetrieveRestart    on

        Umask                   022
        DisplayLogin            welcome.msg
        DisplayFirstChdir       readme
        AllowOverwrite          yes
        IdentLookups            off
        ExtendedLog             /var/log/proftpd/access.log WRITE,READ write
        ExtendedLog             /var/log/proftpd/auth.log AUTH auth

        #
        # Paranoia logging level....
        #
        ExtendedLog    /var/log/proftpd/paranoid.log ALL default

</Global>

Include /etc/proftpd.vhosts.conf

/etc/proftpd.vhosts.conf
Code:
<VirtualHost 0.0.0.0>
        ServerName              "ProFTPd"
        ExtendedLog             /var/log/proftpd/0.0.0.0.bytes WRITE,READ userlog
        AuthUserFile            /usr/local/directadmin/data/users/rpguh/ftp.passwd

</VirtualHost>

Please note that I have removed the ip addresses and made them 0.0.0.0 so don't worry about that.

/usr/local/directadmin/data/users/rpguh/ftp.passwd:
Code:
Don't going to put the passwords here of course, but a long list of users + passwords.

Ok permissions checking time:

# ls -all /etc | grep proftpd
-rw-r--r-- 1 root wheel 1246 Jul 10 11:05 proftpd.conf
-rw-r----- 1 root ftp 5956 Jul 10 12:06 proftpd.passwd
-rw-r--r-- 1 root wheel 203 Jul 10 11:35 proftpd.vhosts.conf

# ls -all /usr/local/directadmin/data/users/rpguh/
total 76
drwx--x--x 3 diradmin diradmin 512 Jul 10 11:40 .
drwx--x--x 119 diradmin diradmin 2048 Jul 10 12:02 ..
-rw-r--r-- 1 diradmin diradmin 2790 Jul 10 11:40 DAdminUsage.bytes
-rw-r--r-- 1 root diradmin 3453 Jul 10 00:36 bandwidth.tally
-rw------- 1 diradmin diradmin 0 May 12 11:21 crontab.conf
drwx--x--x 2 diradmin diradmin 6144 Jul 10 11:40 domains
-rw------- 1 diradmin diradmin 752 Jun 30 14:42 domains.list
-rw-r----- 1 root ftp 3132 Jul 10 11:36 ftp.passwd
-rw-r--r-- 1 diradmin diradmin 41329 Jun 30 14:42 httpd.conf
-rw------- 1 diradmin diradmin 595 Jul 7 14:52 login.hist
-rw------- 1 diradmin diradmin 41 May 12 11:21 ticket.conf
-rw-r--r-- 1 diradmin diradmin 0 May 12 11:21 tickets.list
-rw------- 1 diradmin diradmin 572 Jul 1 01:40 user.conf
-rw------- 1 diradmin diradmin 94 Jul 1 01:40 user.history
-rw------- 1 diradmin diradmin 163 Jul 10 11:36 user.usage

Now the following, every user that is newely added in the ftp.passwd file just does not work! But it works just fine when I add one or more lines from ftp.passwd and put it in the /etc/proftpd.passwd (by copy/pasting). Now I thought, it is a permission problem, so I tested that, by giving it a chmod 777 to the file, but that does not matter, still same problem. So what I'm asking now, I have tested this situation on like 3 machines running DA, and ALL of the machines have the same problem! So this looks like a bug in DA or permissions that aren't rightly set. We are running FreeBSD machines, and all of them has this issue. Can you please help us with this...?
 
I'm having the same problem on one of our servers. What I found out is that the system user that is in the /usr/local/directadmin/data/users/lala/ftp.passwd file like:

lala:iEsOb5i2hLbHg:581:581:system:/home/lala:/bin/false

can still login. New users are added as: test or blaat and not as [email protected] or [email protected]
So proftpd cannot find them.

The problem only excists on users that are on their own ip with a line in /etc/proftpd.vhosts.conf all other users are added in /etc/proftpd.passwd and these work just fine.

Also when I change the AuthUserFile variable in
/usr/local/directadmin/data/users/lala/domains/domain.com.ftp and change the /etc/proftpd.vhosts.conf to point at /etc/proftpd.passwd nothing is added or changed. New ftpusers are still added in the /usr/local/directadmin/data/users/lala/ftp.passwd file.

So maybe this information helps ?

Kind regards,

Cedric
 
Last edited:
The problem only excists on users that are on their own ip with a line in /etc/proftpd.vhosts.conf all other users are added in /etc/proftpd.passwd and these work just fine.

Yup, same here... so i'm really not the only one!
 
Have you tried restarting proftpd? :)

If the users ftp.passwd isn't working, then likely proftpd has not yet been restarted (by DA) after the lines were added into the /etc/proftpd.vhosts.conf

John
 
Off course :-) thats one of the first things I tried!... but this has no effect at all. Proftpd just does not find the users in the ftp.passwd file other than de main system user.


Regards,

Cedric.
 
Yup same here, have tried like everything, and I have seen that more users are having problems with this. So I think you need to login in to some servers and try it yourself.... because we have 4 production machines with the same problemes, and even restarted the whole machine, but that really does not help at all...
 
Hmmmm, well also I have mailed at support but also did not receive any anser to this. Are you going to check this out or must I make my own solution?
 
Regarding the "use" and not "[email protected]", for any *owned* ip address, all ftp users are created with just "user", and not "[email protected]" because with an owned IP, only that ftp.passwd file will use it. This is the intended effect.. which may confused some people who are used to shared IP hosting where DA will add [email protected] for the extra ftp accounts. Note on the ftp page in DA, it will tell you exactly which format you should be using for the given login. Also, remember that for owned IP's, you can *only* use that IP, no other IP will work. Any anyone not setup on that owned IP cannot use it.

John
 
Thanks for the info, but when I add a new user to the account on the "owned" ip-address, I still have the same problem.
All users that I add cannot login, exept the system user in the ftp.passwd file and indeed the system user only can ftp on their "owned" single ip-address. All other users that I add to that account cannot Login.
Proftpd say's in the log-file: User not found.

Kind regards,

Cedric
 
If you want John, I can give you access to one of the servers that has this problem, maybe this is an option to find out the problem ?

Kind regards,

Cedric.
 
Everything is working again,

Somehow the crypted password in ftp.passwd did not match the password you original added.

It seems that upgrading to proftpd 1.3.0 and without PAM-support did the trickt.

John could not detect anything else wrong with our machine so :-)


Greets,

Cedric.
 
Ok, well I have tried it, upgrading to 1.3.0, but it still does not work, still same problem while user really exists in:

/usr/local/directadmin/data/users/rpguh/ftp.passwd

Now I really don't know why he does this. Should I send the info of the server to you john so you could have a look at it, because I really don't know for sure what this is.

Tnx.
 
Sure. It's probably something simple that's been overlooked. Like the /etc/proftpd.vhosts.conf accsesing the ftp.passwd file, or the main /etc/proftpd.conf not including the proftpd.vhosts.conf file (at the bottom). If you send your info, be sure to include a sample ftp account that dosn't work so I have something to test with, as well as the root login and DA login.

John
 
Back
Top