aboutsummaryrefslogtreecommitdiffstats
path: root/config/pure-ftpd
diff options
context:
space:
mode:
Diffstat (limited to 'config/pure-ftpd')
-rw-r--r--config/pure-ftpd/pure-ftpd.xml149
-rw-r--r--config/pure-ftpd/pure-ftpdsettings.xml162
2 files changed, 311 insertions, 0 deletions
diff --git a/config/pure-ftpd/pure-ftpd.xml b/config/pure-ftpd/pure-ftpd.xml
new file mode 100644
index 00000000..e5dcc79f
--- /dev/null
+++ b/config/pure-ftpd/pure-ftpd.xml
@@ -0,0 +1,149 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE packagegui SYSTEM "./schema/packages.dtd">
+<?xml-stylesheet type="text/xsl" href="./xsl/package.xsl"?>
+<packagegui>
+ <copyright>
+ <![CDATA[
+/* $Id$ */
+/* ========================================================================== */
+/*
+ authng.xml
+ part of pfSense (http://www.pfSense.com)
+ Copyright (C) 2007 to whom it may belong
+ All rights reserved.
+
+ Based on m0n0wall (http://m0n0.ch/wall)
+ Copyright (C) 2003-2006 Manuel Kasper <mk@neon1.net>.
+ All rights reserved.
+ */
+/* ========================================================================== */
+/*
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+ OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ */
+/* ========================================================================== */
+ ]]>
+ </copyright>
+ <description>Describe your package here</description>
+ <requirements>Describe your package requirements here</requirements>
+ <faq>Currently there are no FAQ items provided.</faq>
+ <name>pure-ftpd</name>
+ <version>1.0.20_1</version>
+ <title>Services: PureFTPD Accounts</title>
+ <!-- Menu is where this packages menu will appear -->
+ <menu>
+ <name>Pure FTPD Accounts</name>
+ <tooltiptext>Pure FTPd Server is a fast, production quality, standards-conformant FTP server based on Troll-FTPd. It has no known vulnerability, it is trivial to set up, and it is especially designed for modern kernels. Features include PAM support, IPv6, chroot()ed home directories, virtual domains, built-in 'ls', FXP protocol, anti-warez system, bandwidth throttling, restricted ports for passive downloads, an LDAP backend, XML output, and more.</tooltiptext>
+ <section>Services</section>
+ <configfile>pure-ftpd.xml</configfile>
+ </menu>
+ <menu>
+ <name>Pure FTPD Settings</name>
+ <tooltiptext>Pure FTPd Server is a fast, production quality, standards-conformant FTP server based on Troll-FTPd. It has no known vulnerability, it is trivial to set up, and it is especially designed for modern kernels. Features include PAM support, IPv6, chroot()ed home directories, virtual domains, built-in 'ls', FXP protocol, anti-warez system, bandwidth throttling, restricted ports for passive downloads, an LDAP backend, XML output, and more.</tooltiptext>
+ <section>Services</section>
+ <url>pkg_edit.php?xml=pure-ftpdsettings.xml&amp;id=0</url>
+ </menu>
+ <!-- configpath gets expanded out automatically and config items will be
+ stored in that location seperated with -> -->
+ <configpath>installedpackages->package->$packagename->configuration</configpath>
+ <!-- adddeleteeditpagefields items will appear on the first page where you can add / delete or edit
+ items. An example of this would be the nat page where you add new nat redirects -->
+ <adddeleteeditpagefields>
+ <columnitem>
+ <fielddescr>Username</fielddescr>
+ <fieldname>username</fieldname>
+ </columnitem>
+ <columnitem>
+ <fielddescr>Description</fielddescr>
+ <fieldname>description</fieldname>
+ </columnitem>
+ </adddeleteeditpagefields>
+
+ <additional_files_needed>
+ <item>https://packages.pfsense.org/packages/config/pure-ftpd/pure-ftpdsettings.xml</item>
+ </additional_files_needed>
+
+ <!-- fields gets invoked when the user adds or edits a item. the following items
+ will be parsed and rendered for the user as a gui with input, and selectboxes. -->
+ <fields>
+ <field>
+ <fielddescr>Username</fielddescr>
+ <fieldname>username</fieldname>
+ <description>Enter the username here</description>
+ <type>input</type>
+ </field>
+ <field>
+ <fielddescr>Password</fielddescr>
+ <fieldname>password</fieldname>
+ <description>Enter the password here</description>
+ <type>password</type>
+ </field>
+ <field>
+ <fielddescr>Username Description</fielddescr>
+ <fieldname>description</fieldname>
+ <description>Enter the description of the user here</description>
+ <type>input</type>
+ </field>
+ <field>
+ <fielddescr>Account Expiration</fielddescr>
+ <fieldname>expiration</fieldname>
+ <description>Amount of days when account expires. Leave blank for never.</description>
+ <type>input</type>
+ </field>
+ </fields>
+ <custom_delete_php_command>
+ rmdir_recursive("/home/" . $username);
+ system("/usr/sbin/pw userdel " . $username);
+ </custom_delete_php_command>
+ <custom_add_php_command>
+ conf_mount_rw();
+ config_lock();
+ $expires = "";
+ if($_POST['expiration']) $expires = " -e " . $_POST['expiration'];
+ mwexec("/bin/mkdir /home/{$_POST['username']}");
+ mwexec("/usr/sbin/chown -R {$_POST['username']}:wheel /home/{$_POST['username']}");
+ mwexec("/usr/sbin/pw useradd " . $_POST['username'] . $expires . " -m -d /home/" . $_POST['username'] . "/./ -s \"/usr/sbin/nologini\"");
+ $fd = popen("/usr/sbin/pw usermod -n " . $_POST['username'] . " -H 0", "w");
+ $salt = md5(time());
+ $crypted_pw = crypt($_POST['password'],$salt);
+ fwrite($fd, $crypted_pw);
+ pclose($fd);
+ mwexec("/usr/sbin/pw usermod " . $_POST['username'] . " -s /nonexistent");
+ conf_mount_ro();
+ config_unlock();
+ $savemsg = "User has been added.";
+ </custom_add_php_command>
+ <custom_php_install_command>
+ $fout = fopen("/usr/local/etc/rc.d/pure-ftpd.sh","w");
+ fwrite($fout, "#!/bin/sh\n\n");
+ fwrite($fout, "# PACKAGE: Pure-FTPD\n");
+ fwrite($fout, "# EXECUTABLE: pure-ftpd\n");
+ fwrite($fout, "/usr/local/sbin/pure-ftpd -A -B /usr/local/etc/pure-ftpd.conf\n");
+ fclose($fout);
+ chmod("/usr/local/etc/rc.d/pure-ftpd.sh", 0755);
+ mwexec("/usr/local/etc/rc.d/pure-ftpd.sh");
+ </custom_php_install_command>
+ <custom_php_deinstall_command>
+ mwexec("/usr/bin/killall pure-ftpd");
+ rmdir_recursive("/usr/local/etc/pure*");
+ rmdir_recursive("/usr/local/etc/rc.d/pure*");
+ </custom_php_deinstall_command>
+</packagegui>
diff --git a/config/pure-ftpd/pure-ftpdsettings.xml b/config/pure-ftpd/pure-ftpdsettings.xml
new file mode 100644
index 00000000..f904545c
--- /dev/null
+++ b/config/pure-ftpd/pure-ftpdsettings.xml
@@ -0,0 +1,162 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE packagegui SYSTEM "./schema/packages.dtd">
+<?xml-stylesheet type="text/xsl" href="./xsl/package.xsl"?>
+<packagegui>
+ <copyright>
+ <![CDATA[
+/* $Id$ */
+/* ========================================================================== */
+/*
+ authng.xml
+ part of pfSense (http://www.pfSense.com)
+ Copyright (C) 2007 to whom it may belong
+ All rights reserved.
+
+ Based on m0n0wall (http://m0n0.ch/wall)
+ Copyright (C) 2003-2006 Manuel Kasper <mk@neon1.net>.
+ All rights reserved.
+ */
+/* ========================================================================== */
+/*
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+ OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ */
+/* ========================================================================== */
+ ]]>
+ </copyright>
+ <description>Describe your package here</description>
+ <requirements>Describe your package requirements here</requirements>
+ <faq>Currently there are no FAQ items provided.</faq>
+ <name>pure-ftpdsettings</name>
+ <version>none</version>
+ <title>Services: PureFTPD Settings</title>
+ <aftersaveredirect>pkg_edit.php?xml=pure-ftpdsettings.xml&amp;id=0</aftersaveredirect>
+ <!-- Menu is where this packages menu will appear -->
+ <menu>
+ <name>Pure FTPD Settings</name>
+ <tooltiptext>Pure FTPd Server is a fast, production quality, standards-conformant FTP server based on Troll-FTPd. It has no known vulnerability, it is trivial to set up, and it is especially designed for modern kernels. Features include PAM support, IPv6, chroot()ed home directories, virtual domains, built-in 'ls', FXP protocol, anti-warez system, bandwidth throttling, restricted ports for passive downloads, an LDAP backend, XML output, and more.</tooltiptext>
+ <section>Services</section>
+ <configfile>pureftpdsettings.xml</configfile>
+ </menu>
+ <!-- configpath gets expanded out automatically and config items will be
+ stored in that location seperated with -> -->
+ <configpath>installedpackages->package->$packagename->configuration->settings</configpath>
+ <!-- fields gets invoked when the user adds or edits a item. the following items
+ will be parsed and rendered for the user as a gui with input, and selectboxes. -->
+ <fields>
+ <field>
+ <fielddescr>Maximum connections</fielddescr>
+ <fieldname>connections</fieldname>
+ <description>Maximum number of clients allowed</description>
+ <type>input</type>
+ <validationtype>number</validationtype>
+ </field>
+ <field>
+ <fielddescr>Maximum connections per ip address</fielddescr>
+ <fieldname>connectionsperip</fieldname>
+ <description>Maximum number of clients allowed to connect per ip address</description>
+ <type>input</type>
+ </field>
+ <field>
+ <fielddescr>Upload cutoff threshold</fielddescr>
+ <fieldname>cutoffthreshold</fieldname>
+ <description>Disallow upload if the partition is more than percentage full.</description>
+ <type>input</type>
+ <validationtype>number</validationtype>
+ </field>
+ <field>
+ <fielddescr>Begin tcp port range</fielddescr>
+ <fieldname>beginport</fieldname>
+ <description>Specify that client connections begin at this port.</description>
+ <type>input</type>
+ </field>
+ <field>
+ <fielddescr>End tcp port range</fielddescr>
+ <fieldname>endport</fieldname>
+ <description>Specify that client connections end at this port.</description>
+ <type>input</type>
+ <validationtype>number</validationtype>
+ </field>
+ <field>
+ <fielddescr>Limit upload bandwidth</fielddescr>
+ <fieldname>uploadbw</fieldname>
+ <description>Limit the upload bandwdith in KB/s</description>
+ <type>input</type>
+ <validationtype>number</validationtype>
+ </field>
+ <field>
+ <fielddescr>Limit download bandwidth</fielddescr>
+ <fieldname>downloadbw</fieldname>
+ <description>Limit the download bandwdith in KB/s</description>
+ <type>input</type>
+ <validationtype>number</validationtype>
+ </field>
+ <field>
+ <fielddescr>Client File Deletion</fielddescr>
+ <fieldname>filedeletion</fieldname>
+ <description>Allow clients to upload files but disallow their ability to delete uploaded items.</description>
+ <type>checkbox</type>
+ </field>
+ <field>
+ <fielddescr>NAT Workaround mode</fielddescr>
+ <fieldname>natworkaround</fieldname>
+ <description>NAT mode. Force active mode. If your FTP server is behind a NAT box that doesn't support applicative FTP proxying, or if you use port redirection without a transparent FTP proxy, use this. Well... the previous sentence isn't very clear. Okay: if your network looks like this: FTP--NAT.gateway/router--Internet and if you want people coming from the internet to have access to your FTP server, please try without this option first. If Netscape clients can connect without any problem, your NAT gate-way rulez. If Netscape doesn't display directory listings, your NAT gateway sucks.</description>
+ <type>checkbox</type>
+ </field>
+ <field>
+ <fielddescr>Chroot environment</fielddescr>
+ <fieldname>chroot</fieldname>
+ <description>Allow users (but root) to only see their ~ and no system files.</description>
+ <type>checkbox</type>
+ </field>
+ </fields>
+ <custom_delete_php_command>
+ </custom_delete_php_command>
+ <custom_add_php_command>
+ conf_mount_rw();
+ config_lock();
+ unlink_if_exists("/usr/local/etc/rc.d/pure-ftp*");
+ $fout = fopen("/usr/local/etc/rc.d/pure-ftpd.sh","w");
+ fwrite($fout, "#!/bin/sh\n\n");
+ $startline = "/usr/local/sbin/pure-ftpd";
+ if($_POST['connections']) $startline .= " -c " . $_POST['connections'];
+ if($_POST['connectionsperip']) $startline .= " -C " . $_POST['connectionsperip'];
+ if($_POST['cutoffthreshold']) $startline .= " -k " . $_POST['cutoffthreshold'];;
+ if($_POST['beginport'] and $_POST['endport']) $startline .= " -p " . $_POST['beginport'] . ":" . $_POST['endport'];
+ if($_POST['uploadbw'] and $_POST['downloadbw']) $startline .= " -T " . $_POST['uploadbw'] . ":" . $_POST['downloadbw'];;
+ if($_POST['natworkaround']) $startline .= " -N";
+ if($_POST['filedeletion']) $startline .= " -K";
+ if($_POST['chroot']) $startline .= " -A";
+ $startline .= " -B /usr/local/etc/pure-ftpd.conf";
+ fwrite($fout, $startline . "\n");
+ fclose($fout);
+ conf_mount_ro();
+ config_unlock();
+ chmod("/usr/local/etc/rc.d/pure-ftpd.sh", 0755);
+ mwexec("killall pure-ftpd");
+ mwexec("/usr/local/etc/rc.d/pure-ftpd.sh");
+ </custom_add_php_command>
+ <custom_php_install_command>
+ </custom_php_install_command>
+ <custom_php_deinstall_command>
+ </custom_php_deinstall_command>
+</packagegui>
+