block
-sub get_proftpd_virtualhost_ips
-{
-my ($d) = @_;
-my @ips;
-if ($d->{'virt'}) {
- # Accept all connections on an IP
- @ips = ( $d->{'ip'} );
- if ($d->{'virt6'}) {
- push(@ips, $d->{'ip6'});
- }
- }
-else {
- # Match by hostname
- @ips = ( $d->{'dom'} );
- }
-return @ips;
-}
-
-# feature_depends_ftp()
-# Return undef if the requirements for virtual FTP are met, or an error message
-sub feature_depends_ftp
-{
-my $mclink = "../config.cgi?$module_name";
-&foreign_installed("proftpd", 1) == 2 ||
- return &text('index_eproftpd', "/proftpd/", $clink);
-my $err = &check_proftpd_template();
-return $err ? &text('check_proftpd', $err) : undef;
-}
-
-$done_feature_script{'ftp'} = 1;
-
-1;
-
diff --git a/feature-logrotate.pl b/feature-logrotate.pl
index a1b911d3e..682cbb236 100755
--- a/feature-logrotate.pl
+++ b/feature-logrotate.pl
@@ -494,7 +494,7 @@ sub show_template_logrotate
print &ui_table_row(
&hlink($text{'tmpl_logrotate'}, "template_logrotate"),
&none_def_input("logrotate", $tmpl->{'logrotate'},
- $text{'tmpl_ftpbelow'}, 0, 0,
+ $text{'tmpl_logrotatebelow'}, 0, 0,
$text{'tmpl_logrotatenone'},
[ "logrotate" ])."
\n".
&ui_textarea("logrotate",
@@ -504,10 +504,10 @@ sub show_template_logrotate
# Additional files to rotate
print &ui_table_row(
- &hlink($text{'tmpl_logrotate_files'}, "template_logrotatefiles"),
+ &hlink($text{'tmpl_logrotate_files'}, "template_logrotatefiles"),
&none_def_input("logrotate_files", $tmpl->{'logrotate_files'},
- $text{'tmpl_ftpbelow2'}, 0, 0,
- $text{'tmpl_logrotatenone2'},
+ $text{'tmpl_logrotatebelow2'}, 0, 0,
+ $text{'tmpl_logrotatenone2'},
[ "logrotate_files" ])."
\n".
&ui_textarea("logrotate_files",
$tmpl->{'logrotate_files'} eq 'none' ? '' :
@@ -663,9 +663,6 @@ sub get_all_domain_logs
my $alog = &get_website_log($d, 0);
my $elog = &get_website_log($d, 1);
my @logs = ( $alog, $elog );
-if ($d->{'ftp'}) {
- push(@logs, &get_proftpd_log($d));
- }
push(@logs, $d->{'php_error_log'} || &get_domain_php_error_log($d));
if ($tmpl) {
push(@logs, &get_domain_template_logs($d));
@@ -694,4 +691,3 @@ sub get_domain_template_logs
$done_feature_script{'logrotate'} = 1;
1;
-
diff --git a/feature-ssl.pl b/feature-ssl.pl
index 3b40c1e63..fc001f9f8 100755
--- a/feature-ssl.pl
+++ b/feature-ssl.pl
@@ -3032,58 +3032,6 @@ sub update_ssl_postfix_service
}
}
-# sync_proftpd_ssl_cert(&domain, enable)
-# Configure ProFTPd to use a domain's SSL cert for connections on its IP
-sub sync_proftpd_ssl_cert
-{
-my ($d, $enable) = @_;
-&foreign_require("proftpd");
-&proftpd::lock_proftpd_files();
-my ($virt, $vconf, $conf) = &get_proftpd_virtual($d);
-return 0 if (!$virt);
-if ($enable) {
- # Make proftpd virtualhost use domain's SSL cert files
- my $cfile = &get_website_ssl_file($d, "cert");
- my $kfile = &get_website_ssl_file($d, "key");
- if (&get_ssl_key_type($kfile) eq 'ec') {
- &proftpd::save_directive(
- "TLSECCertificateFile", [ $cfile ], $vconf, $conf);
- &proftpd::save_directive(
- "TLSECCertificateKeyFile", [ $kfile ], $vconf, $conf);
- }
- else {
- &proftpd::save_directive(
- "TLSRSACertificateFile", [ $cfile ], $vconf, $conf);
- &proftpd::save_directive(
- "TLSRSACertificateKeyFile", [ $kfile ], $vconf, $conf);
- }
- my $cafile = &get_website_ssl_file($d, "ca");
- &proftpd::save_directive(
- "TLSCACertificateFile", $cafile ? [ $cafile ] : [ ], $vconf, $conf);
- &proftpd::save_directive("TLSEngine", [ "on" ], $vconf, $conf);
- &proftpd::save_directive("TLSOptions", [ "NoSessionReuseRequired" ], $vconf, $conf);
- }
-else {
- # Remove SSL cert for domain
- &proftpd::save_directive(
- "TLSRSACertificateFile", [ ], $vconf, $conf);
- &proftpd::save_directive(
- "TLSRSACertificateKeyFile", [ ], $vconf, $conf);
- &proftpd::save_directive(
- "TLSECCertificateFile", [ ], $vconf, $conf);
- &proftpd::save_directive(
- "TLSECCertificateKeyFile", [ ], $vconf, $conf);
- &proftpd::save_directive(
- "TLSCACertificateFile", [ ], $vconf, $conf);
- &proftpd::save_directive("TLSEngine", [ ], $vconf, $conf);
- &proftpd::save_directive("TLSOptions", [ ], $vconf, $conf);
- }
-&flush_file_lines($virt->{'file'}, undef, 1);
-&proftpd::unlock_proftpd_files();
-®ister_post_action(\&restart_proftpd);
-return 1;
-}
-
# get_postfix_ssl_cert(&domain)
# Returns the path to the cert, key and CA cert in the Postfix config for
# a domain, if any
@@ -4083,7 +4031,7 @@ sub show_template_ssl
"template_web_usermin_ssl"),
&ui_yesno_radio("web_usermin_ssl", $tmpl->{'web_usermin_ssl'}));
-# Setup Dovecot, Postfix, MySQL and ProFTPd SSL certs
+# Setup Dovecot, Postfix and MySQL SSL certs
print &ui_table_row(&hlink($text{'newweb_dovecot'},
"template_web_dovecot_ssl"),
&ui_yesno_radio("web_dovecot_ssl", $tmpl->{'web_dovecot_ssl'}));
@@ -4096,9 +4044,6 @@ sub show_template_ssl
"template_web_mysql_ssl"),
&ui_yesno_radio("web_mysql_ssl", $tmpl->{'web_mysql_ssl'}));
-print &ui_table_row(&hlink($text{'newweb_proftpd'},
- "template_web_proftpd_ssl"),
- &ui_yesno_radio("web_proftpd_ssl", $tmpl->{'web_proftpd_ssl'}));
}
# parse_template_ssl(&tmpl)
@@ -4169,7 +4114,6 @@ sub parse_template_ssl
$tmpl->{'web_postfix_ssl'} = $in{'web_postfix_ssl'};
$tmpl->{'web_dovecot_ssl'} = $in{'web_dovecot_ssl'};
$tmpl->{'web_mysql_ssl'} = $in{'web_mysql_ssl'};
-$tmpl->{'web_proftpd_ssl'} = $in{'web_proftpd_ssl'};
}
# chained_ssl(&domain, [&old-domain])
@@ -4269,4 +4213,3 @@ sub get_dovecot_ssl_dir
$done_feature_script{'ssl'} = 1;
1;
-
diff --git a/feature-unix.pl b/feature-unix.pl
index a20e18b84..24dfc3496 100755
--- a/feature-unix.pl
+++ b/feature-unix.pl
@@ -827,7 +827,7 @@ sub bandwidth_unix
{
my ($d, $start, $bw) = @_;
my $log = $config{'bw_ftplog'} ? $config{'bw_ftplog'} :
- $config{'ftp'} ? &get_proftpd_log() : undef;
+ &get_proftpd_log();
if ($log) {
my @users;
my @ashells = grep { $_->{'mailbox'} } &list_available_shells();
@@ -1396,4 +1396,3 @@ sub create_email_for_unix
$done_feature_script{'unix'} = 1;
1;
-
diff --git a/feature-webmin.pl b/feature-webmin.pl
index 01fa2ac87..35045a9a2 100755
--- a/feature-webmin.pl
+++ b/feature-webmin.pl
@@ -798,14 +798,6 @@ sub set_user_modules
$sd->{'dom'}))
if ($elog && !$done{$elog}++);
}
- # Add FTP logs
- if ($sd->{'ftp'}) {
- my $flog = &get_proftpd_log($sd);
- if ($flog && !$done{$flog}++) {
- push(@extras, $flog." ".&text('webmin_flog',
- $sd->{'dom'}))
- }
- }
# Add PHP log
my $phplog = &get_domain_php_error_log($d);
if ($phplog && !$done{$phplog}++) {
@@ -1479,4 +1471,3 @@ sub release_lock_webmin
$done_feature_script{'webmin'} = 1;
1;
-
diff --git a/functional-test.pl b/functional-test.pl
index 196a04245..11fc90c96 100755
--- a/functional-test.pl
+++ b/functional-test.pl
@@ -12907,78 +12907,6 @@ package virtual_server;
$transfer_tests = [ { 'command' => 'echo Missing user or password ; false' } ];
}
-$ftp_tests = [
- # Create a domain with SSL, FTP and a private IP
- { 'command' => 'create-domain.pl',
- 'args' => [ [ 'domain', $test_domain ],
- [ 'desc', 'Test FTP domain' ],
- [ 'pass', 'smeg' ],
- [ 'dir' ], [ 'unix' ], [ $web ], [ 'dns' ], [ $ssl ],
- [ 'logrotate' ], [ 'ftp' ],
- [ 'allocate-ip' ],
- [ 'content' => 'Test FTP home page' ],
- @create_args, ],
- },
-
- # Copy the domain's SSL cert to proftpd
- { 'command' => 'install-service-cert.pl',
- 'args' => [ [ 'domain', $test_domain ],
- [ 'add-domain' ],
- [ 'service', 'proftpd' ] ],
- },
-
- # Check that anonymous FTP to it works
- { 'command' => $wget_command.' --inet4 '.
- 'ftp://'.$test_domain.'/',
- 'antigrep' => 'Login incorrect',
- },
-
- # Put a file in the anonymous FTP directory
- { 'command' => 'echo "bar" >~'.
- $test_domain_user.'/ftp/foo.txt',
- },
-
- # Try to fetch it
- { 'command' => $wget_command.' --inet4 '.
- 'ftp://'.$test_domain.'/foo.txt',
- 'grep' => 'bar',
- },
-
- # Test that encrypted FTP works and serves the right cert
- { 'command' => $curl_command.' --ftp-ssl --insecure -v --ipv4 '.
- 'ftp://'.$test_domain.'/foo.txt',
- 'grep' => [ 'bar', 'O=Test FTP domain', 'CN=(\\*\\.)?'.$test_domain ],
- },
-
- # Disable the domain
- { 'command' => 'disable-domain.pl',
- 'args' => [ [ 'domain' => $test_domain ],
- [ 'feature' => 'ftp' ] ],
- },
-
- # FTP should fail now
- { 'command' => $wget_command.' --inet4 '.
- 'ftp://'.$test_domain.'/',
- 'grep' => 'Login incorrect',
- 'fail' => 1,
- },
-
- # Re-enable the domain
- { 'command' => 'enable-domain.pl',
- 'args' => [ [ 'domain' => $test_domain ] ],
- },
-
- # FTP should work again
- { 'command' => $wget_command.' --inet4 '.
- 'ftp://'.$test_domain.'/',
- 'antigrep' => 'Login incorrect',
- },
-
- # Cleanup the domain
- { 'command' => 'delete-domain.pl',
- 'args' => [ [ 'domain', $test_domain ] ],
- 'cleanup' => 1 },
- ];
$xml_tests = [
# Create a domain to run API commands on
@@ -13262,7 +13190,6 @@ package virtual_server;
'allscript' => $allscript_tests,
'parallel_backup' => $parallel_backup_tests,
'transfer' => $transfer_tests,
- 'ftp' => $ftp_tests,
'scheduled' => $scheduled_tests,
'xml' => $xml_tests,
'assoc' => $assoc_tests,
diff --git a/get-logs.pl b/get-logs.pl
index 03cc30fc5..65631424a 100755
--- a/get-logs.pl
+++ b/get-logs.pl
@@ -6,8 +6,8 @@ =head1 get-logs.pl
Given a domain name with the C<--domain> flag, this command outputs some or
all of it's Apache access or error log. The log file to display can be
-selected with the C<--access-log>, C<--error-log> or C<--ftp-log> flag,
-and the number of lines to output can be limited with the C<--tail> flag
+selected with the C<--access-log> or C<--error-log> flag, and the number
+of lines to output can be limited with the C<--tail> flag
followed by a line count.
=cut
@@ -45,7 +45,7 @@ package virtual_server;
$logtype = "elog";
}
elsif ($a eq "--ftp-log") {
- $logtype = "flog";
+ &usage("Per-domain FTP logs are no longer supported");
}
elsif ($a eq "--tail") {
$lines = int(shift(@ARGV));
@@ -69,10 +69,6 @@ package virtual_server;
&usage("Virtual server does not have a website");
$logfile = &get_website_log($d, $logtype eq "elog" ? 1 : 0);
}
-elsif ($logtype eq "flog") {
- $d->{'ftp'} || &usage("Virtual server does not have FTP enabled");
- $logfile = &get_proftpd_log($d);
- }
$logfile || &usage("Log file not found!");
# Print it out
@@ -94,8 +90,7 @@ sub usage
print "Output webserver logs for a domain.\n";
print "\n";
print "virtualmin get-logs --domain name\n";
-print " --access-log | --error-log | --ftp-log\n";
+print " --access-log | --error-log\n";
print " [--tail lines]\n";
exit(1);
}
-
diff --git a/help/config_avail_logviewer.html b/help/config_avail_logviewer.html
index f55892f00..0c036e5ea 100644
--- a/help/config_avail_logviewer.html
+++ b/help/config_avail_logviewer.html
@@ -1,9 +1,8 @@
System Logs (view Apache and FTP logs)
When this option is enabled, virtual server administrations will be able
-to view the contents of their Apache and virtual anonymous FTP log files
+to view the contents of their Apache log files
via the web interface. This is done by granting limited access to the
System Logs Viewer module.