View Single Post
  #3  
Old 27th January 2010, 07:46
por por is offline
Junior Member
 
Join Date: Jan 2010
Posts: 12
Thanks: 1
Thanked 8 Times in 2 Posts
Default Heres how to get it to work with Ubuntu 9.10

For Ubuntu Karmic Koala 9.10 do the following to add net2ftp/WebFTP:

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/apache2/conf.d
9. nano webftp.conf or vi webftp.conf

Add This:
<Directory /var/www/webftp>
Order deny,allow
Allow from all
</Directory>
Alias /net2ftp /var/www/webftp
Alias /webftp /var/www/webftp

11. If using nano save with this (CTRL+O,Press Enter,CTRL+X) is vi use this (Shift+ZZ)
12. /etc/init.d/apache2 restart
13. cd /var/www/ispconfig/sites
14. nano site_webftp.php or vi site_webftp.php

Add This:
<?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. If using nano save with this (CTRL+O,Press Enter,CTRL+X) is vi use this (Shift+ZZ)
17. chown ispconfig:ispconfig site_webftp.php
18. cd /var/www/ispconfig/sites/templates
19. nano web_domain_list.htm or vi web_domain_list.htm
20. /*Go to line 44*/ (if using VI type 44G) | (if using nano just scroll down with arrow, find position typing CTRL+C)
21. Add This:
<a class="icons16 icoWebFTP" href="sites/site_webftp.php?id={tmpl_var name='id'}" target="webftp"><span>{tmpl_var name='admin_txt'}</span></a>

22. If using nano save with this (CTRL+O,Press Enter,CTRL+X) is vi use this (Shift+ZZ)
23. cd /var/www/ispconfig/themes/default/css/screen
24. nano content_ispc.css or vi content_ispc.css
25. /*Go to line 291*/ (if using VI type 291G) | (if using nano just scroll down with arrow, find position typing CTRL+C)
26. Add This:
.icons16.icoWebFTP { background-image: url("../../icons/x16/folder_open.png"); }

27. cd /var/www/webftp
28. nano settings_authorizations.inc.php or vi settings_authorizations.inc.php
29. /*Go to line 35*/ (if using VI type 35G) | (if using nano just scroll down with arrow, find position typing CTRL+C)
30. Find:
$net2ftp_settings["allowed_ftpservers"][1] = "ALL";
Change to this:
//$net2ftp_settings["allowed_ftpservers"][1] = "ALL";//commented out to add webftp/net2ftp

31. Right above the text you commented out add this:
$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 you will see a smal Open folder icon.

Reply With Quote