Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Old 1st January 2013, 04:37
agentmoller001 agentmoller001 is offline
Junior Member
Join Date: Feb 2012
Location: Glendora, CA - USA
Posts: 11
Thanks: 10
Thanked 8 Times in 3 Posts
Default ISPConfig 3.0.5 RC1 & web2ftp-install.sh on Debian Squeeze

I am having problems getting this script to work. I tried it and noticed that the line numbers to insert/modify in the script were wrong for ISPConfig 3.0.5 RC1. I think that I adjusted them properly but I still can't get it to work.
Does this have to be done before the install of ISPConfig 3?

I added the webftp url "/webftp" in System > Interface > Main Config > Sites > WebFTP URL, but still nothing.

# cat web2ftp.sh 
set -x

# Download, unzip, and more
cd /tmp
wget http://www.net2ftp.com/download/net2ftp_v0.98.zip
unzip net2ftp_v0.98.zip
cd net2ftp_v0.98
mv files_to_upload /var/www/webftp
cd ..
/bin/rm -R net2ftp_v0.98

# add to webftp.conf
echo ............. Creating /etc/apache2/conf.d/webftp.conf
cat <<EOF>/etc/apache2/conf.d/webftp.conf
<Directory /var/www/webftp>
Order deny,allow
Allow from all
Alias /net2ftp /var/www/webftp
Alias /webftp /var/www/webftp

# Restart apache
echo ............. Restarting apache
/etc/init.d/apache2 restart

echo ............. Creating /var/www/ispconfig/sites/site_webftp.php
cat <<EOF>/var/www/ispconfig/sites/site_webftp.php
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 = " .

echo ............. Setting permissions for /var/www/ispconfig/sites/site_webftp.php
chown ispconfig:ispconfig /var/www/ispconfig/sites/site_webftp.php

echo ............. Modifing line 61 /var/www/ispconfig/sites/templates/web_domain_list.htm  Backup on /var/www/ispconfig/sites/templates/web_domain_list.htm.bak.$$
cp /var/www/ispconfig/sites/templates/web_domain_list.htm /var/www/ispconfig/sites/templates/web_domain_list.htm.bak.$$
sed -i "61i<a class=\"icons16 icoWebFTP\" href=\"sites/site_webftp.php?id={tmpl_var name=\'id\'}\" target=\"webftp\"><span>{tmpl_var name=\'admin_txt\'}</span></a>" /var/www/ispconfig/sites/templates/web_domain_list.htm
diff /var/www/ispconfig/sites/templates/web_domain_list.htm /var/www/ispconfig/sites/templates/web_domain_list.htm.bak.$$ |less

echo ............. Adding text on line 381 /var/www/ispconfig/themes/default/css/screen/content_ispc.css  Backup on  /var/www/ispconfig/themes/default/css/screen/content_ispc.css.bak.$$
cp /var/www/ispconfig/themes/default/css/screen/content_ispc.css /var/www/ispconfig/themes/default/css/screen/content_ispc.css.bak.$$
sed -i '381i.icons16.icoWebFTP { background-image: url(\"../../icons/x16/folder_open.png\"); }' /var/www/ispconfig/themes/default/css/screen/content_ispc.css
diff /var/www/ispconfig/themes/default/css/screen/content_ispc.css /var/www/ispconfig/themes/default/css/screen/content_ispc.css.bak.$$ |less

echo ............. Commenting line 35 /var/www/webftp/settings_authorizations.inc.php Backup on /var/www/webftp/settings_authorizations.inc.php.bak.$$
cp /var/www/webftp/settings_authorizations.inc.php /var/www/webftp/settings_authorizations.inc.php.bak.$$
sed -i '35s/^/\/\/ /'  /var/www/webftp/settings_authorizations.inc.php
sed -i '35s/$/ \/\/commented out to add webftpi\/net2ftp/'  /var/www/webftp/settings_authorizations.inc.php
diff /var/www/webftp/settings_authorizations.inc.php /var/www/webftp/settings_authorizations.inc.php.bak.$$  |less 

echo ............. Adding text on line 34  /var/www/webftp/settings_authorizations.inc.php Backup on /var/www/webftp/settings_authorizations.inc.php.bak2.$$
cp /var/www/webftp/settings_authorizations.inc.php /var/www/webftp/settings_authorizations.inc.php.bak2.$$

sed -i "34i \$ftp_server=null; \n \$ftp_server=trim\(\$_GET[\'servername\'], \'\\\\\"\'\); \n if\(!strlen\(\$ftp_server\)\){ \n \$ftp_server=\$_COOKIE[\'ftp_server\']; \n } \n else{ \n setcookie\(\"ftp_server\", \$ftp_server\); \n } \n if(strlen\(\$ftp_server\)\){ \n \$net2ftp_settings[\"allowed_ftpservers\"][1] = \$ftp_server; \n } \n else{ \n \$net2ftp_settings[\"allowed_ftpservers\"][1] = \"ALL\"; \n } \n 
" /var/www/webftp/settings_authorizations.inc.php

diff /var/www/webftp/settings_authorizations.inc.php /var/www/webftp/settings_authorizations.inc.php.bak2.$$  |less
Any help would be appreciated.
ISPConfig 3 web hosting at charterhosting.com
Reply With Quote
Sponsored Links


debian squeeze, ispconfig 3.0.5, net2ftp, webftp

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Default crontab for ISPConfig on Debian squeeze Gherc Installation/Configuration 1 19th March 2012 09:23
All files gone after changing quota to 0 spynode General 17 19th January 2012 15:41
Control Panel - E-mail Tab is empty domi-nik General 15 14th April 2011 19:17
Loads of mysql connections to dbispconfig StrikerNL General 2 5th March 2009 15:31
e-mail problem!!! Debian 3.1 maroonworks Installation/Configuration 18 6th December 2005 15:42

All times are GMT +2. The time now is 05:05.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.