Configuration - FTP Server Configuration

Overview

Table of Contents.

Versions 2.1.6 and newer


Versions 2.1.5 and older

 

 

 

Versions 2.1.6 and newer

ProFTPd Server Integration 

Operating Systems: Linux (CentOS, Debian, Ubuntu etc.)

  1. Ensure ProFTPd is installed on your server.
    /etc/init.d/proftpd status
  2. Determine UID and GID of the MediaCP software
    ls –l /var/www/html/mediacp/

    This should return something similar to the following, note i have highlighted the USER and GROUP, you will need these in the next step.

     

    Now to determine the UID and GID, we can execute something similar to:

    id matt;

    You will now be presented with the UID and GID of the user, in my case the UID is 500 and the GID is also 500.

  3. Update MediaCP Configuration
    Login to MediaCP and navigate to Administration -> Configuration then select the "FTP Integration" tab.
    Select "ProFTPd (LINUX)" from the FTP Integration drop down.

    FTP INTEGRATION ProFTPd (LINUX)
    FTPSERVER_PREFIX Set to "cast_" as default.
    FTPSERVER_HOST The host address that your customers will connect to.
    FTPSERVER_DOMAIN This is the suffix to the ftp username, eg cast_1@www.yourdomain.com
    FTPSERVER_UID Refer to Step 2 above for the value. This must be accurate to work.
    FTPSERVER_GID Refer to Step 2 above for the value. This must be accurate to work.

    Press Save Configuration when complete.


  4. Create ProFTPd passwd and group files for MediaCP to update automatically
    Be sure to replace "apache" with the proper username used with your MediaCP.

    touch /etc/cc_passwd; touch /etc/cc_group; chmod 777 /etc/cc_*;
    chown apache:root /etc/cc_passwd; 
    chown apache:root /etc/cc_group;
  5. Open the ProFTPd Configuration File for editing
    nano /etc/proftpd.conf
    Locate AuthOrder and set it to the following, if it does not exist then add it into the file:
    AuthOrder mod_auth_unix.c mod_auth_file.c

    IMPORTANT
    Only one AuthUserFile line can exist in the file - If a line including "AuthUserFile" already exists, you will need to join the current file and the Cast-Control file.
    To do this, follow this step then use "AuthUserFile /etc/cc_passwd_merged" instead below.

    Add the following lines to the file:

    ServerName "CastControl FTP Service"
    IdentLookups off
    RequireValidShell off
    DefaultRoot ~
    AuthUserFile /etc/cc_passwd
    AuthGroupFile /etc/cc_group

    Save the file by pressing CTRL + X then "Y" to save.

  6. Restart ProFTPd

    Plesk Users
    /etc/init.d/xinetd restart

    All Other Users
    /etc/init.d/proftpd restart

Troubleshooting

Invalid username or password when logging in
In certain cases, other ProFTPd authentication modules may declare themselves as "authoritative", which will prevent ProFTPd from trying to authenticate against Centova Cast's user database. If you find yourself in such a situation, modify your AuthOrder line in the configuration file such that "mod_auth_file.c" is first in the list of authentication modules. Then restart ProFTPd and try again.

Merging AuthUserFile 
Only one AuthUserFile line can exist in the file - If a line including "AuthUserFile" already exists, you will need to join the current file and the Cast-Control file.
To do this, create a cron job by opening "nano /etc/crontab" and placing something like the following:
(Be sure to replace the red text with the current AuthUserFile path)
* * * * * root rm -f /etc/cc_passwd_merged; cat /etc/proftpd.password /etc/cc_passwd >> /etc/cc_passwd_merged

cPanel FTP Account Integration 

This integration allows the control panel to create FTP accounts directly through your cpanel username.

  • This method of integration will not work if secure tokens are enabled in cPanel.
  • For SSL connections, please specify port 2083.
  • The cPanel account being used MUST be in ENGLISH or the integration will fail.

 

  1. Open MediaCP -> Configuration
    Login to MediaCP and navigate to Administration -> Configuration then select the FTP Integration tab.


    FTP INTEGRATION cPanel (LINUX)
    FTPSERVER_PREFIX Set to "cast_" as default.
    FTPSERVER_HOST The host address that your customers will connect to and for MediaCP to connect to cPanel.
    FTPSERVER_DOMAIN This is the suffix to the ftp username, eg cast_1@www.yourdomain.com
    FTPSERVER_PORT
    Provide the port that cPanel uses for standard account access. Port 2083 for SSL.
    FTPSERVER_USERNAME
    cPanel Username to login as a standard account. "root" will not work.
    FTPSERVER_PASSWORD cPanel Password to login as a standard account. root password might not work.
    FTPSERVER_PATH IMPORTANT this is the cPanel user account path, not the FULL directory. In most cases this is /public_html/ or /public_html/mediacp/
    FTPSERVER_THEME x3 is the only theme known to work at this time. You should change your cPanel theme if it is different.

    Press Save Configuration when complete.

  2. Testing / Troubleshooting
    Create an AutoDJ service and navigate to the FTP Details page. Press the Reset button once and the cPanel FTP account should be generated.
    You can double check this by logging into cPanel and navigating to FTP Accounts.

    If the account is not created, double check all the settings in step 1.

 

 

FileZilla FTP Server Integration 

 

  1. Install / Setup FileZilla FTP Server

    XAMPP / FileZilla
    1. Open C:/xampp/xampp-control.exe and check the box next to "Svc".
    2. Start FileZilla FTP Server

    Fresh FileZilla Installation
    1. Download and install the latest filezilla from http://filezilla-project.org/download.php?type=server


  2. Open MediaCP -> Configuration
    Login to MediaCP and navigate to Administration -> Configuration then select the FTP Integration tab.

    FTP INTEGRATION FileZillaServer (WINDOWS)
    FTPSERVER_PREFIX Set to "cast_" as default.
    FTPSERVER_CONFIGFILE You will need to enter the PATH to FileZilla Installation.

    XAMPP: C:\xampp\FileZillaFTP\
    Fresh FileZilla Installation: C:\Program Files (x86)\FileZillaServer\
    FTPSERVER_HOST The host address that your customers will connect to and for MediaCP to connect to cPanel.
    FTPSERVER_DOMAIN This is the suffix to the ftp username, eg cast_1@www.yourdomain.com

  3. Save Configuration & Test

 

 

Versions 2.1.5 and older

 

ProFTPd Server Integration 

Operating Systems: Linux (CentOS, Debian, Ubuntu etc.)

  1. Ensure ProFTPd is installed on your server.
    /etc/init.d/proftpd status
  2. Determine UID and GID of the MediaCP software
    ls –l /var/www/html/panel/

    This should return something similar to the following, note i have highlighted the USER and GROUP, you will need these in the next step.

     

     

     

    Now to determine the UID and GID, we can execute something similar to:

    id matt;

    You will now be presented with the UID and GID of the user, in my case the UID is 500 and the GID is also 500.




     

  3. Update MediaCP database.php
    Locate the $setting['ftpserver_integration'] and similar options and update as follows (replacing yourdomain.coma and the UID and GID).
    $setting['ftpserver_integration']  = 'enabled';
    $setting['ftpserver_host'] = 'yourdomain.com’;
    $setting['ftpserver_domain'] = 'yourdomain.com';
    $setting['uid'] = 500;
    $setting['gid'] = 500;
  4. Create ProFTPd passwd and group files for MediaCP to update automatically
    Be sure to replace "apache" with the proper username used with your MediaCP.

    touch /etc/cc_passwd; touch /etc/cc_group; chmod 777 /etc/cc_*;
    chown apache:root /etc/cc_passwd; 
    chown apache:root /etc/cc_group;
  5. Open the ProFTPd Configuration File for editing
    nano /etc/proftpd.conf
    Locate AuthOrder and set it to the following, if it does not exist then add it into the file:
    AuthOrder mod_auth_unix.c mod_auth_file.c

    Add the following lines to the file:

    ServerName "CastControl FTP Service"
    IdentLookups off
    RequireValidShell off
    DefaultRoot ~
    AuthUserFile /etc/cc_passwd
    AuthGroupFile /etc/cc_group

    Save the file by pressing CTRL + X then "Y" to save.

  6. Restart ProFTPd

    Plesk Users
    /etc/init.d/xinetd restart

    All Other Users
    /etc/init.d/proftpd restart

Troubleshooting

Invalid username or password when logging in
In certain cases, other ProFTPd authentication modules may declare themselves as "authoritative", which will prevent ProFTPd from trying to authenticate against Centova Cast's user database. If you find yourself in such a situation, modify your AuthOrder line in the configuration file such that "mod_auth_file.c" is first in the list of authentication modules. Then restart ProFTPd and try again.

Products Web Services LiveZilla Live Help