The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Ftp

Discussion in 'General Discussion' started by theDOG, Mar 21, 2003.

  1. theDOG

    theDOG Member

    Joined:
    Jan 18, 2003
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Reposted from WHT, since it's either a stupid question, it's in the wrong forum, or nobody knows:

    --------

    I'll try to make this as brief as possible...

    My host moved my WHM/CPanel reseller account to a dedicated server. He moved my nameservers at the same time, and i guess he had a small difficulty getting hostnames to bind to the proper IPs, i don't know what was the difficulty or how he worked around it.

    Anyway since then i've lost access to most of my FTP hosts as they were set up, and new accounts aren't working.

    In proftpd.conf i have a list of virtualhosts, and all of them say this:
    <VirtualHost xx.x.x.84>

    ...except for the last one which is bound to a diffrent IP. So when i restart ftp, it complains it can't bind xx.x.x.84:21 to ftp.second.com because it's already bound to ftp.first.com. Ergo none my hostnames work except the first and last ones listed.

    When i make new accounts in WHM, the logins show up in passwd.vhosts, but don't have <virtualhost> entries in proftpd.conf.

    So, in summary, i've got some FTP accounts that will work with the old hostname/logins that were migrated from my reseller account, some old accounts that only work by IP, and some new accounts that refuse login entirely. This even though the ftp hostname resolves and the logins are present in passwd.vhosts.

    WHM is confusing me. That was not my intent when i paid extra for it.

    --------

    P.S. I should have mentioned that logins also appear in their respective AuthUserFile(s). Which files also reference something called /bin/ftpsh which i don't know what that does but there's no such thing on this server.

    --------

    Watch me talk to myself!

    Changing the vhosts to the server's main IP solved the hostname issue.

    WHM is still not making new FTP virtualhosts when i create new accounts, and new FTP accounts created in CPanel will not authorize logins.

    --------

    Am i asking in the wrong forum?

    The thing being that i don't understand how WHM works with ProFTP.

    Here's where i am now, just for kicks in case anyone can help:

    My machine has 3 IPs.
    xxx.xxx.xxx.139
    xxx.xxx.xxx.83
    xxx.xxx.xxx.84
    ... the first one is the main server IP. The second and third are for my nameserver(s), and they have some domains bound to them as well, a legacy from my old reseller account.

    Proftpd.conf has a number of vhost entries that are also legacies from the old account. As noted up there^ these entries were bound to different IPs, which proftp didn't like that and complained about it until i made them all say the same thing, which caused the hostnames to resolve. AND, since i moved to ded server, WHM no longer makes vhost entries when i make new accounts. It doesn't seem to matter, the password and authUser files let everyone log in their proper directories.

    I have two problems:

    1) I don't understand where these legacy vhosts came from, why if WHM wrote them on my reseller account, it doesn't do it now, and if it even matters.

    2) More important, disturbing, and baffling is that when i make new accounts, FTP logins DO NOT WORK with the primary server IP. They work with either of the other ones, which i can't find an explanation for.

    Said new domains haven't been transferred yet, is why i'm not using the ftp hostname. I've assured my clients that ftp.domain.com will work when DNS propagates, i hope i'm not mistaken.

    Help?
    Thanks.
    --------
    --------

    Sorry i put a whole thread of me talking to myself in one post. I'm trying to work it out myself, but i'm failing. I got all functionality except new virtualhost entries, which i'm still not clear if i need or not, and the dang thing working on IPs that i specifically told it not to.

    Thanks.
     
  2. theDOG

    theDOG Member

    Joined:
    Jan 18, 2003
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Correction... ProFTP doesn't like all the virtualhosts on one IP either. I didn't look after the hostname thing was fixed :eek:

    cannot bind xxx.xxx.xxx.139:21 to server 'ftp.blah.com', already bound to 'ftp.bleh.com'

    What the heck? How you make vhosts at all, if you can't use an IP more than once?

    Please help... i'm have to subscribe to ProFTP mailing list, and i hate mailing lists. :(

    P.S. Was i supposed to set up my resolve.conf when i got this server? Could that be one my problems?
     
  3. theDOG

    theDOG Member

    Joined:
    Jan 18, 2003
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    According to ProFTP docs, and anyone else i've asked, virtualhosts don't work the same with ProFTP as they do with Apache. Specifically, i'm told there needs to be unique address/port combinations for each entry. This does not square with what WHM was doing.

    I made a test domain, then deleted it, and was told:

    "Removed Entry from proftpd.conf"

    Which i take to mean there should have been an entry, even though there wasn't.

    So let me ask the question like this:

    Could someone please look in their proftd.conf and see if there's a vhost entry for each of your domains? And if there is, do they all have identical address/port combinations? Because that's not even theoretically supposed to work.

    Thanks.
     
  4. xsenses

    xsenses Well-Known Member

    Joined:
    Aug 29, 2002
    Messages:
    233
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Huntington Beach, Ca
    I looked at mine and there is not an entry for each domain, just my main domain (hostname).
     
  5. theDOG

    theDOG Member

    Joined:
    Jan 18, 2003
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Somebody said something! THANK YOU!

    I guess i'll just delete 'em then.

    Hey, did i say THANK YOU? This has been a lot of typing in a lot of places, a lot of Googling, and not a small bit of stress since i want it working before my new clients' DNS propagates.
     
  6. xsenses

    xsenses Well-Known Member

    Joined:
    Aug 29, 2002
    Messages:
    233
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Huntington Beach, Ca
    If you want I can post the contents of the proftpd.conf file.
     
  7. Juanra

    Juanra Well-Known Member

    Joined:
    Sep 22, 2001
    Messages:
    777
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Spain
    There should be a vhost entry for a domain if that domain has been assigned its own IP, at least I understand that's how proftpd works.

    You might want to make a backup copy of your proftpd.conf file and then run /scripts/rebuildproftpd
     
  8. theDOG

    theDOG Member

    Joined:
    Jan 18, 2003
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Here's my proftpd.conf, greatly abbreviated and somewhat obfuscated, but otherwise exactly what was dragged over from my reseller account. As you can see, WHM wrote entries for each my domains, many with duplicate IPs.

    That's the main thing that confuses me, is why it did that before, but doesn't anymore, and why it worked on my reseller account when it's not supposed to. Although i wouldn't have had any way to know if it wasn't working before, not having access to the logs.

    And it would seem to be necessary to have these entries, to set options that otherwise wouldn't be.

    Many thanks, again.
     

    Attached Files:

  9. theDOG

    theDOG Member

    Joined:
    Jan 18, 2003
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    That sounds like a promising thing, or at least a thing, to do. Will do. Thanks. :)
     
  10. theDOG

    theDOG Member

    Joined:
    Jan 18, 2003
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    I'm sorry to bump this again, i'm just baffled.

    The only reference i can find to that script is in cpanel docs; "Restore proftpd.conf from httpd.conf."

    Sure enough, when i run it, that's exactly the output i get. I thought it was determined that virtualhosts won't work like that for ProFTP, because of the duplicate IPs. And anyway, the file was unchanged. It still looks exactly like i left it.

    Do i maybe have a permissions problem? Proftpd.conf is owned by root:root, and only writable by root.

    And/or maybe somebody can clue me about why, when ProFTP's config file has only my server IP in the vhosts, and DNS points to the main server IP, the IPs that actually work for FTP are the other two, which i haven't told anything, anywhere, to use those. Not that i'm aware of, anyway. ;)

    What i think is this WHM account just didn't move gracefully to a new install from a reseller account, and i'm missing something very basic and hopefully simple.
     
Loading...

Share This Page