How to Integrate Net2FTP in ISPConfig3 – CentOS

1. cd /tmp
2. wget http://www.net2ftp.com/download/net2ftp_v0.98.zip
3. unzip net2ftp_v0.98.zip
4. cd net2ftp_v0.98
5. mv files_to_upload /var/www/webftp
6. cd ..
7. /bin/rm -R net2ftp_v0.98
8. cd /etc/httpd/conf.d
9. vi webftp.conf
10. Insert

Order deny,allow
Allow from all

Alias /net2ftp /var/www/webftp
Alias /webftp /var/www/webftp

11. Shift+ZZ
12. /etc/init.d/httpd restart
13. cd /var/www/ispconfig/sites
14. vi site_webftp.php
15. insert

<!--?php require_once('../../lib/config.inc.php'); require_once('../../lib/app.inc.php'); $app--->auth->check_module_permissions('sites');
if (!isset($_GET['id'])){
die ("No site selected!");
}
$domainId = intval($_GET['id']);
$dbData = $app->db->queryOneRecord("SELECT server_id FROM web_domain WHERE
domain_id = " . $domainId);
$serverId = intval($dbData['server_id']);
if ($serverId == 0){
die ("No Server found!");
}
$serverData = $app->db->queryOneRecord(
"SELECT server_name FROM server WHERE server_id = " .
$serverId);
header('location:/webftp?servername="'.$serverData['server_name'].'"');
exit;
?>

16.Shift+ZZ
17. chown ispconfig:ispconfig site_webftp.php
18. cd /var/www/ispconfig/sites/templates
19. vi web_domain_list.htm
20. 44G /*Go to line 44*/
21. Insert

<a class="icons16 icoWebFTP" href="sites/site_webftp.php?id={tmpl_var name='id'}" target="webftp">{tmpl_var name='admin_txt'}</a>

22. Shift+ZZ
23. cd /var/www/ispconfig/themes/default/css/screen
24. vi content_ispc.css
25. 291G/*Go to line 91*/
26. insert .icons16.icoWebFTP { background-image: url(“../../icons/x16/folder_open.png”); }
27. cd /var/www/webftp
28. vi settings_authorizations.inc.php
29. 34G /*Go to line 91*/
30. change
$net2ftp_settings[“allowed_ftpservers”][1] = “ALL”;
to
$ftp_server=null;
$ftp_server=trim($_GET[‘servername’], ‘”‘);
if(!strlen($ftp_server)){
$ftp_server=$_COOKIE[‘ftp_server’];
}
else{
setcookie(“ftp_server”, $ftp_server);
}
if(strlen($ftp_server)){
$net2ftp_settings[“allowed_ftpservers”][1] = $ftp_server;
}
else{
$net2ftp_settings[“allowed_ftpservers”][1] = “ALL”;
}


Now you can access webftp from domain list with ftplink (Open folder icon). Source here

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: