[BUG] FTP username is not listed (dedicated IP)

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
15,366
Location
www.poralix.com
Hello,

I guess it's a bug, please check it and fix it.

How to repeat:

1. Set a dedicated (owned) IP for an account.

2. Set ftpsep to -

Code:
# /usr/local/directadmin/directadmin c | grep ftpsep
ftpsep=-

3. Create a new FTP account for the hosting account (in step 1) with a "-" in it. Let it be blabla-blabla

FTP account gets created and is listed in

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

Code:
# cat /usr/local/directadmin/data/users/username/ftp.passwd
username:$1$dh2FHgNh$ft1****CJLooUwjVDw1:598:598:system:/home/username:/bin/false
blabla-blabla:$1$JDK4JM*****mviVx86CEZnscP.0:598:598:custom:/home/username/domains/domain.com/public_html:/bin/false
tom:$1$fPURn*****.E2t3bDqOGsV/:598:598:custom:/home/username/domains/domain.com/public_html/tom:/bin/false

and actually it seems to work, but you won't see it in the list of FTP accounts (user level).

I'd guess the same will be if you use any other char in FTP username, if the char is set as ftpsep in directadmin.conf
 
Hello John,

Correct me if I'm wrong, so since this check it would not be possible to add username with a ftpsep in it, isn't it? If so, one thing I've noticed, when my hosting account had a shared IP, I created an additional FTP account, so it was something like

Code:
blabla-domain.com

as I use ftpsep=-. And when I switched the hosting account to a dedicated (owned) IP, I was not any more possible to list/edit/delete the FTP account (blabla-domain.com) via directadmin interface.

I can not say that it would be the same actual for ftpsep=@, but in my case FTP account

Code:
blabla-domain.com

was not modified to

Code:
blabla

with setting a dedicated IP.

Will you please fix it?
 
Hmm.. I wasn't able to duplicate that issue.

I created a test domain called ftp-sep.com under a User on a shared IP.
I created and ftp account user-ftp-sep.com.
I then moved the DA User onto an owned IP, and "user" showed up correctly in the ftp.passwd file....


The IP change aside, I'd recommend using the unified_ftp_password_file=1 value anyway.. which would null changing IPs.. since the format never changes, and always lives in /etc/proftpd.passwd.
http://www.directadmin.com/features.php?id=1134

John
 
user-ftp-sep.com

turned into "user". For the domain ftp-sep.com.

I didn't notice an issue... perhaps I'm doing something differently.. I moved the account from a shared IP to an owned ip.

The way DA figures it out, is it first grabs all Users on the domain from the list.
It parses until the ftpsep token.. and everything after that is the domain. If the domain matches, everything before ftpsep is the user. This means you can have ftpsep in the domain itself, that shouldn't matter.

John
 
Back
Top