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 usernames for subdirectories

Discussion in 'General Discussion' started by Wallaby, Feb 2, 2003.

  1. Wallaby

    Wallaby Well-Known Member

    Joined:
    Aug 15, 2001
    Messages:
    131
    Likes Received:
    1
    Trophy Points:
    18
    Recently we experimented with pureftp and then changed back to proftpd.

    After the change back to proftpd, additional ftp accounts to subdirectories which used to work fine with a username of &subdirectory& not &subdirectory@domain.com& now will only work with &subdirectory@domain.com& as a username. This includes accounts which have a dedicated IP, not just shared IP accounts.

    This is causing one client *major* problems as they have lots of software with the &subdirectory& style login hard-coded. As you can imagine, I'm getting lots of earache about it!

    Please, please, please someone tell me how to revert back to the &old& style username login?

    Thanks a million.
     
  2. SprintSlash

    SprintSlash Well-Known Member

    Joined:
    Jan 18, 2003
    Messages:
    163
    Likes Received:
    0
    Trophy Points:
    16
    You can't do that w/ proftpd yet I think. You have to use &username@domain.com& for the user.
     
  3. Wallaby

    Wallaby Well-Known Member

    Joined:
    Aug 15, 2001
    Messages:
    131
    Likes Received:
    1
    Trophy Points:
    18
    Sorry, think you misunderstood my question. It *used* to work fine with just username not username@domain.com, but now it doesn't. So something has changed, and I'm trying to find out what.
     
  4. Wallaby

    Wallaby Well-Known Member

    Joined:
    Aug 15, 2001
    Messages:
    131
    Likes Received:
    1
    Trophy Points:
    18
    *Please* can a DarkOrb staffer respond on this one to confirm or otherwise if I've got this right!

    I'll answer my own question!

    For proftpd, the config is in /etc/proftpd.conf. Near the top is:

    AuthUserFile /etc/proftpd/passwd.vhosts

    If you look down into the various &VirtualHost 123.456.123.153& sections (one for each IP-based account??) you will see:

    AuthUserFile /etc/proftpd/userid

    where userid is the &master& account username for an IP-based account.

    If you look in a /etc/proftpd/userid file you will see usernames of the form &username& (that is *not* &username@domain.com& ). This was possible because an IP-based account could identify the usernames file to use from the IP address.

    For name-based (shared IP) accounts, the usernames were stored in /etc/proftpd/passwd.vhosts and for this type of account usernames for &extra& FTP accounts (for subdirectories) had to be of the form &username@domain.com& so they could be uniquely identified in /etc/proftpd/passwd.vhosts

    Now, my guess is that pureftp *only* uses the /etc/proftpd/passwd.vhosts file for usernames/passwords and has no facility for different sets of usernames tied to just one IP address.

    So, since the advent of pureftp (maybe after it is installed for the first time?), *both* proftpd and pureftp are now forced to use *only* the etc/proftpd/passwd.vhosts file for usernames etc and any additional /etc/proftpd/userid files are now ignored by proftpd.

    I can't work out how this is being done by CPanel/WHM but it seems the case from my experiments.

    Ok, so why not just go into etc/proftpd/passwd.vhosts and change &username@domain.com& to &username&? This does work fine, *but* if you then access the FTP area of CPanel for that domain it will then re-write the etc/proftpd/passwd.vhosts file and enforce the &username@domain.com& style. There is a disparity actually, as in CPanel the ftp username for an added ftp account on an IP-based account is still displayed as &username& not &username@domain.com&.

    So, the long and short of it is that we are now stuck with &username@domain.com&.

    Would DarkOrb please respond and confirm or correct me? Cheers!
     
Loading...

Share This Page