From 12ffd24ce62867d20de763b55d47cbc86609aac5 Mon Sep 17 00:00:00 2001 From: Daniel Stefan Haischt Date: Fri, 18 Aug 2006 21:08:23 +0000 Subject: fixed FTP service --- packages/freenas/pkg/freenas_services.inc | 104 ++++++++++++++++++++++++++++-- packages/freenas/www/services_ftp.php | 41 +++++++++++- 2 files changed, 135 insertions(+), 10 deletions(-) diff --git a/packages/freenas/pkg/freenas_services.inc b/packages/freenas/pkg/freenas_services.inc index c49d7823..add418ed 100644 --- a/packages/freenas/pkg/freenas_services.inc +++ b/packages/freenas/pkg/freenas_services.inc @@ -31,6 +31,9 @@ POSSIBILITY OF SUCH DAMAGE. */ +define (FTP_BACKEND_PAM, "pam"); +define (FTP_BACKEND_PLAINTEXT, "plaintext"); + $freenas_config =& $config['installedpackages']['freenas']['config'][0]; function services_samba_configure() { @@ -449,7 +452,7 @@ function services_ftpd_configure() { } function services_wzdftpd_configure() { - global $freenas_config, $g; + global $freenas_config, $config, $g; /* kill any WZDFTPD */ killbyname("wzdftpd"); @@ -466,6 +469,7 @@ function services_wzdftpd_configure() { mkdir("/usr/local/etc/wzdftpd"); /* generate wzd.cfg */ + chmod("/usr/local/etc/wzdftpd/wzd.cfg", 0600); $fd = fopen("/usr/local/etc/wzdftpd/wzd.cfg", "w"); if (!$fd) { printf("Error: cannot open vsftpd.conf in services_vsftpd_configure().\n"); @@ -487,7 +491,7 @@ pasv_high_range = {$freenas_config['ftp']['pasv_max_port']} EOD; } - + $ftpconf .= <<getHTML(); + + + + + +
+ + + + - +
-- cgit v1.2.3