Media Control Panel » Documentation » Configuration » FTP Server Configuration
Table of Contents.
Versions 2.1.6 and newer
Operating Systems: Linux (CentOS, Debian, Ubuntu etc.)
/etc/init.d/proftpd status
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.
![]()
| 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. |
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;
nano /etc/proftpd.confLocate 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.
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
This integration allows the control panel to create FTP accounts directly through your cpanel username.
| 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. |
| 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 |
Operating Systems: Linux (CentOS, Debian, Ubuntu etc.)
/etc/init.d/proftpd status
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.
![]()
$setting['ftpserver_integration'] = 'enabled';
$setting['ftpserver_host'] = 'yourdomain.com’;
$setting['ftpserver_domain'] = 'yourdomain.com';
$setting['uid'] = 500;
$setting['gid'] = 500;
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;
nano /etc/proftpd.confLocate 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.
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.