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.

Error "421 Home directory not available - aborting" after addftp()

Discussion in 'cPanel Developers' started by Joerg, Jun 9, 2011.

  1. Joerg

    Joerg Registered

    Joined:
    Jun 9, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Hi Guys! I have an urgent problem:

    Since June I got the "421 Home directory not available - aborting" Error in the ftp client after I created Ftp accounts with the xml-api class. For all newly created ftp accounts, I can't connect to the ftp account always the "421" error appears. Ftp accounts created before June I can connect.

    I add a ftp account like:
    PHP:
    $cpanel = new xmlapi($config->deebee->cpanel->hostname);
    $cpanel->set_port($config->deebee->cpanel->port);
    $cpanel->set_user($config->deebee->cpanel->username);
    $cpanel->set_password($config->deebee->cpanel->password);
    $cpanel->set_output($config->deebee->cpanel->output);

    // CPanel FTP User Settings - weitere Infos unter http://docs.cpanel.net/twiki/bin/view/ApiDocs/Api2/ApiFtp
    $options = array(
        
    'user'=>$username,
        
    'pass'=>$password,
        
    'homedir'=>$homedir,
        
    'quota'=>0
    );

    // API Call und Umwandlung in SimpleXMLElement
    $apiResultXML $cpanel->api2_query($config->deebee->cpanel->username"Ftp""addftp"$options);
    The result is ok! The ftp account will be created and appears in the cPanel too but I can't access.
    The homedir path is /home/deebee/public_html/ftp/<dir>

    PHP:
      <cpanelresult>
        <
    apiversion>2</apiversion>
        <
    data>
          <
    reason>OK</reason>
          <
    result>1</result>
        </
    data>

        <
    event>
          <
    result>1</result>
        </
    event>
        <
    func>addftp</func>
        <
    module>Ftp</module>
      </
    cpanelresult>

    That's strange I didn't edit my api call and then I asked the hosting provider and he say to me that he hasn't changed the server configuration. But he said cPanel may have updated to a newer version. cPanel Build is 11.30.0 (build 27).
    Fact is I need to add new ftp-accounts over the customer web application. In cPanel created ftp directories I can connect, without the "421" error. But that's not I want.

    Now I run out of ideas and I hope someone can help me ?
     
  2. Joerg

    Joerg Registered

    Joined:
    Jun 9, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    I found the problem.

    For my case, the newer cPanel Version lowered the letters of the directory name :confused: but the directory name in the filesystem are not lowered. So the ftp homedir can't be found on ftp connection.

    Why does cPanel suddenly convert the letters in lower case? Is this a bug?
     
  3. MattDees

    MattDees cPanel Product Owner
    Staff Member

    Joined:
    Apr 29, 2005
    Messages:
    417
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Joerg, I'm not too sure what you mean by "newer cPanel Version lowered the letters of the directory name" Do you mean the name of the directory is lower cased in some config file? if so, which?
     
    #3 MattDees, Jun 10, 2011
    Last edited by a moderator: Jun 11, 2011
Loading...

Share This Page