Some additional changes
This commit is contained in:
386
lib/configfiles/precise.inc.php
Normal file
386
lib/configfiles/precise.inc.php
Normal file
@@ -0,0 +1,386 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2003-2009 the SysCP Team (see authors).
|
||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||
*
|
||||
* For the full copyright and license information, please view the COPYING
|
||||
* file that was distributed with this source code. You can also view the
|
||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||
*
|
||||
* @copyright (c) the authors
|
||||
* @author Florian Lippert <flo@syscp.org> (2003-2009)
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Configfiles
|
||||
*
|
||||
*/
|
||||
|
||||
return Array(
|
||||
'ubuntu_lucid' => Array(
|
||||
'label' => 'Ubuntu 12.04 (Precise)',
|
||||
'services' => Array(
|
||||
'http' => Array(
|
||||
'label' => $lng['admin']['configfiles']['http'],
|
||||
'daemons' => Array(
|
||||
'apache2' => Array(
|
||||
'label' => 'Apache 2',
|
||||
'commands' => Array(
|
||||
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
||||
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
||||
($settings['system']['deactivateddocroot'] != '') ? 'mkdir -p ' . $settings['system']['deactivateddocroot'] : '',
|
||||
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||
'a2dismod userdir'
|
||||
),
|
||||
'files' => ((int)$settings['phpfpm']['enabled'] == 1) ?
|
||||
Array(
|
||||
'etc_apache2_mods-enabled_fastcgi.conf' => '/etc/apache2/mods-enabled/fastcgi.conf'
|
||||
)
|
||||
:
|
||||
null,
|
||||
'restart' => Array(
|
||||
'/etc/init.d/apache2 restart'
|
||||
),
|
||||
),
|
||||
'lighttpd' => Array(
|
||||
'label' => 'Lighttpd Webserver',
|
||||
'commands_1' => Array(
|
||||
'apt-get install lighttpd',
|
||||
),
|
||||
'files' => Array(
|
||||
'etc_lighttpd.conf' => '/etc/lighttpd/lighttpd.conf',
|
||||
),
|
||||
'commands_2' => Array(
|
||||
$configcommand['vhost'],
|
||||
$configcommand['diroptions'],
|
||||
$configcommand['v_inclighty'],
|
||||
$configcommand['d_inclighty'],
|
||||
'lighty-disable-mod cgi',
|
||||
'lighty-disable-mod fastcgi',
|
||||
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
||||
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
||||
($settings['system']['deactivateddocroot'] != '') ? 'mkdir -p ' . $settings['system']['deactivateddocroot'] : '',
|
||||
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir']
|
||||
),
|
||||
'restart' => Array(
|
||||
'/etc/init.d/lighttpd restart'
|
||||
),
|
||||
),
|
||||
'nginx' => Array(
|
||||
'label' => 'Nginx Webserver',
|
||||
'commands_1' => Array(
|
||||
'apt-get install nginx php5-cgi',
|
||||
),
|
||||
'files' => Array(
|
||||
'etc_nginx_nginx.conf' => '/etc/nginx/nginx.conf',
|
||||
'etc_init.d_php-fcgi' => '/etc/init.d/php-fcgi'
|
||||
),
|
||||
'commands_2' => Array(
|
||||
'rm /etc/nginx/sites-enabled/default',
|
||||
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
||||
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
||||
'mkdir -p ' . $settings['system']['deactivateddocroot'],
|
||||
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||
'chmod u+x /etc/init.d/php-fcgi'
|
||||
),
|
||||
'restart' => Array(
|
||||
'/etc/init.d/php-fcgi start',
|
||||
'/etc/init.d/nginx restart'
|
||||
)
|
||||
),
|
||||
),
|
||||
),
|
||||
'dns' => Array(
|
||||
'label' => $lng['admin']['configfiles']['dns'],
|
||||
'daemons' => Array(
|
||||
'bind' => Array(
|
||||
'label' => 'Bind9',
|
||||
'commands' => Array(
|
||||
'apt-get install bind9',
|
||||
'echo "include \"' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf\";" >> /etc/bind/named.conf',
|
||||
'touch ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
|
||||
'chown root:bind ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
|
||||
'chmod 0644 ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf'
|
||||
),
|
||||
'restart' => Array(
|
||||
'/etc/init.d/bind9 restart'
|
||||
)
|
||||
),
|
||||
'powerdns' => Array(
|
||||
'label' => 'PowerDNS',
|
||||
'files' => Array(
|
||||
'etc_powerdns_pdns.conf' => '/etc/powerdns/pdns.conf',
|
||||
'etc_powerdns_pdns-froxlor.conf' => '/etc/powerdns/pdns_froxlor.conf',
|
||||
),
|
||||
'restart' => Array(
|
||||
'/etc/init.d/pdns restart'
|
||||
)
|
||||
),
|
||||
)
|
||||
),
|
||||
'smtp' => Array(
|
||||
'label' => $lng['admin']['configfiles']['smtp'],
|
||||
'daemons' => Array(
|
||||
'postfix_courier' => Array(
|
||||
'label' => 'Postfix/Courier',
|
||||
'commands' => Array(
|
||||
'apt-get install postfix postfix-mysql libsasl2-2 libsasl2-modules libsasl2-modules-sql',
|
||||
'mkdir -p /var/spool/postfix/etc/pam.d',
|
||||
'mkdir -p /var/spool/postfix/var/run/mysqld',
|
||||
'groupadd -g ' . $settings['system']['vmail_gid'] . ' vmail',
|
||||
'useradd -u ' . $settings['system']['vmail_uid'] . ' -g vmail vmail',
|
||||
'mkdir -p ' . $settings['system']['vmail_homedir'],
|
||||
'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'],
|
||||
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'touch /etc/postfix/mysql-virtual_sender_permissions.cf',
|
||||
'touch /etc/postfix/sasl/smtpd.conf',
|
||||
'chown root:root /etc/postfix/main.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_sender_permissions.cf',
|
||||
'chown root:root /etc/postfix/sasl/smtpd.conf',
|
||||
'chmod 0644 /etc/postfix/main.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_sender_permissions.cf',
|
||||
'chmod 0600 /etc/postfix/sasl/smtpd.conf',
|
||||
),
|
||||
'files' => Array(
|
||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf',
|
||||
'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'etc_postfix_mysql-virtual_sender_permissions.cf' => '/etc/postfix/mysql-virtual_sender_permissions.cf',
|
||||
'etc_postfix_sasl_smtpd.conf' => '/etc/postfix/sasl/smtpd.conf'
|
||||
),
|
||||
'restart' => Array(
|
||||
'newaliases',
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'dkim' => Array(
|
||||
'label' => 'DomainKey filter',
|
||||
'commands_1' => Array(
|
||||
'apt-get install dkim-filter',
|
||||
'mkdir -p /etc/postfix/dkim'
|
||||
),
|
||||
'files' => Array(
|
||||
'dkim-filter.conf' => '/etc/dkim-filter.conf'
|
||||
),
|
||||
'commands_2' => Array(
|
||||
'echo "milter_default_action = accept" >> /etc/postfix/main.cf',
|
||||
'echo "milter_protocol = 2" >> /etc/postfix/main.cf',
|
||||
'echo "smtpd_milters = inet:localhost:8891" >> /etc/postfix/main.cf',
|
||||
'echo "non_smtpd_milters = inet:localhost:8891" >> /etc/postfix/main.cf'
|
||||
),
|
||||
'restart' => Array(
|
||||
'/etc/init.d/dkim-filter restart',
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'postfix_dovecot' => Array(
|
||||
'label' => 'Postfix/Dovecot',
|
||||
'commands' => Array(
|
||||
'apt-get install postfix postfix-mysql',
|
||||
'mkdir -p /var/spool/postfix/etc/pam.d',
|
||||
'mkdir -p /var/spool/postfix/var/run/mysqld',
|
||||
'groupadd -g ' . $settings['system']['vmail_gid'] . ' vmail',
|
||||
'useradd -u ' . $settings['system']['vmail_uid'] . ' -g vmail vmail',
|
||||
'mkdir -p ' . $settings['system']['vmail_homedir'],
|
||||
'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'],
|
||||
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'touch /etc/postfix/mysql-virtual_sender_permissions.cf',
|
||||
'chown root:root /etc/postfix/main.cf',
|
||||
'chown root:root /etc/postfix/master.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_sender_permissions.cf',
|
||||
'chmod 0644 /etc/postfix/main.cf',
|
||||
'chmod 0644 /etc/postfix/master.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_sender_permissions.cf'
|
||||
),
|
||||
'files' => Array(
|
||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf',
|
||||
'etc_postfix_master.cf' => '/etc/postfix/master.cf',
|
||||
'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'etc_postfix_mysql-virtual_sender_permissions.cf' => '/etc/postfix/mysql-virtual_sender_permissions.cf'
|
||||
),
|
||||
'restart' => Array(
|
||||
'/etc/init.d/postfix restart',
|
||||
'newaliases'
|
||||
)
|
||||
),
|
||||
'postfix_mxaccess' => Array(
|
||||
'label' => 'Postfix MX-Access (anti spam)',
|
||||
'files' => Array(
|
||||
'etc_postfix_mx_access' => '/etc/postfix/mx_access',
|
||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf'
|
||||
),
|
||||
'commands_1' => Array(
|
||||
'postmap /etc/postfix/mx_access'
|
||||
),
|
||||
'restart' => Array(
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'exim4' => Array(
|
||||
'label' => 'Exim4',
|
||||
'commands_1' => Array(
|
||||
'dpkg-reconfigure exim4-config',
|
||||
'# choose "no configuration at this time" and "splitted configuration files" in the dialog'
|
||||
),
|
||||
'files' => Array(
|
||||
'etc_exim4_conf.d_acl_30_exim4-config_check_rcpt.rul' => '/etc/exim4/conf.d/acl/30_exim4-config_check_rcpt.rul',
|
||||
'etc_exim4_conf.d_auth_30_froxlor-config' => '/etc/exim4/conf.d/auth/30_froxlor-config',
|
||||
'etc_exim4_conf.d_main_10_froxlor-config_options' => '/etc/exim4/conf.d/main/10_froxlor-config_options',
|
||||
'etc_exim4_conf.d_router_180_froxlor-config' => '/etc/exim4/conf.d/router/180_froxlor-config',
|
||||
'etc_exim4_conf.d_transport_30_froxlor-config' => '/etc/exim4/conf.d/transport/30_froxlor-config'
|
||||
),
|
||||
'commands_2' => Array(
|
||||
'chmod o-rx /var/lib/exim4',
|
||||
'chmod o-rx /etc/exim4/conf.d/main/10_froxlor-config_options'
|
||||
),
|
||||
'restart' => Array(
|
||||
'/etc/init.d/exim4 restart'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'mail' => Array(
|
||||
'label' => $lng['admin']['configfiles']['mail'],
|
||||
'daemons' => Array(
|
||||
'courier' => Array(
|
||||
'label' => 'Courier',
|
||||
'commands' => Array(
|
||||
'apt-get install courier-pop courier-imap courier-authlib-mysql'
|
||||
),
|
||||
'files' => Array(
|
||||
'etc_courier_authdaemonrc' => '/etc/courier/authdaemonrc',
|
||||
'etc_courier_authmysqlrc' => '/etc/courier/authmysqlrc'
|
||||
),
|
||||
'restart' => Array(
|
||||
'/etc/init.d/courier-authdaemon restart',
|
||||
'/etc/init.d/courier-pop restart'
|
||||
)
|
||||
),
|
||||
'dovecot' => Array(
|
||||
'label' => 'Dovecot',
|
||||
'commands_1' => Array(
|
||||
'apt-get install dovecot-imapd dovecot-pop3d dovecot-postfix'
|
||||
),
|
||||
'files' => Array(
|
||||
'etc_dovecot_auth.d_01-dovecot-postfix.auth' => '/etc/dovecot/auth.d/01-dovecot-postfix.auth',
|
||||
'etc_dovecot_conf.d_01-dovecot-postfix.conf' => '/etc/dovecot/conf.d/01-dovecot-postfix.conf',
|
||||
'etc_dovecot_dovecot-sql.conf' => '/etc/dovecot/dovecot-sql.conf'
|
||||
),
|
||||
'commands_2' => Array(
|
||||
'chmod 0640 /etc/dovecot/dovecot-sql.conf'
|
||||
),
|
||||
'restart' => Array(
|
||||
'/etc/init.d/dovecot restart'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'ftp' => Array(
|
||||
'label' => $lng['admin']['configfiles']['ftp'],
|
||||
'daemons' => Array(
|
||||
'proftpd' => Array(
|
||||
'label' => 'ProFTPd',
|
||||
'commands' => Array(
|
||||
'apt-get install proftpd-basic proftpd-mod-mysql'
|
||||
),
|
||||
'files' => Array(
|
||||
'etc_proftpd_sql.conf' => '/etc/proftpd/sql.conf',
|
||||
'etc_proftpd_modules.conf' => '/etc/proftpd/modules.conf',
|
||||
'etc_proftpd_proftpd.conf' => '/etc/proftpd/proftpd.conf'
|
||||
),
|
||||
'restart' => Array(
|
||||
'/etc/init.d/proftpd restart'
|
||||
)
|
||||
),
|
||||
'pure-ftpd' => Array(
|
||||
'label' => 'Pure FTPd',
|
||||
'commands_1' => Array(
|
||||
'apt-get install pure-ftpd-common pure-ftpd-mysql'
|
||||
),
|
||||
'files' => Array(
|
||||
'etc_pure-ftpd_conf_MinUID' => '/etc/pure-ftpd/conf/MinUID',
|
||||
'etc_pure-ftpd_conf_MySQLConfigFile' => '/etc/pure-ftpd/conf/MySQLConfigFile',
|
||||
'etc_pure-ftpd_conf_NoAnonymous' => '/etc/pure-ftpd/conf/NoAnonymous',
|
||||
'etc_pure-ftpd_conf_MaxIdleTime' => '/etc/pure-ftpd/conf/MaxIdleTime',
|
||||
'etc_pure-ftpd_conf_ChrootEveryone' => '/etc/pure-ftpd/conf/ChrootEveryone',
|
||||
'etc_pure-ftpd_conf_PAMAuthentication' => '/etc/pure-ftpd/conf/PAMAuthentication',
|
||||
'etc_pure-ftpd_db_mysql.conf' => '/etc/pure-ftpd/db/mysql.conf',
|
||||
'etc_pure-ftpd_conf_CustomerProof' => '/etc/pure-ftpd/conf/CustomerProof',
|
||||
'etc_pure-ftpd_conf_Bind' => '/etc/pure-ftpd/conf/Bind',
|
||||
'etc_default_pure-ftpd-common' => '/etc/default/pure-ftpd-common'
|
||||
),
|
||||
'commands_2' => Array(
|
||||
'chmod 0640 /etc/pure-ftpd/db/mysql.conf'
|
||||
),
|
||||
'restart' => Array(
|
||||
'/etc/init.d/pure-ftpd-mysql restart'
|
||||
)
|
||||
),
|
||||
)
|
||||
),
|
||||
'etc' => Array(
|
||||
'label' => $lng['admin']['configfiles']['etc'],
|
||||
'daemons' => Array(
|
||||
'cron' => Array(
|
||||
'label' => 'Crond (cronscript)',
|
||||
'files' => Array(
|
||||
'etc_cron.d_froxlor' => '/etc/cron.d/froxlor'
|
||||
),
|
||||
'restart' => Array(
|
||||
'/etc/init.d/cron restart'
|
||||
)
|
||||
),
|
||||
'awstats' => Array(
|
||||
'label' => 'Awstats',
|
||||
'commands' => Array(
|
||||
'apt-get install awstats',
|
||||
'cp /usr/share/doc/awstats/examples/awstats_buildstaticpages.pl '.makeCorrectDir($settings['system']['awstats_path']),
|
||||
'mv '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf').' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
|
||||
'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf')
|
||||
),
|
||||
),
|
||||
'libnss' => Array(
|
||||
'label' => 'libnss-bg (system login with mysql)',
|
||||
'commands' => Array(
|
||||
'apt-get install libnss-mysql-bg nscd',
|
||||
'chmod 600 /etc/nss-mysql.conf /etc/nss-mysql-root.conf'
|
||||
),
|
||||
'files' => Array(
|
||||
'etc_libnss-mysql.conf' => '/etc/libnss-mysql.conf',
|
||||
'etc_libnss-mysql-root.conf' => '/etc/libnss-mysql-root.conf',
|
||||
'etc_nsswitch.conf' => '/etc/nsswitch.conf',
|
||||
),
|
||||
'restart' => Array(
|
||||
'/etc/init.d/nscd restart'
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
@@ -45,5 +45,5 @@ else
|
||||
|
||||
$cfgPath = 'lib/configfiles/';
|
||||
$configfiles = Array();
|
||||
$configfiles = array_merge(include $cfgPath . 'squeeze.inc.php', include $cfgPath . 'lenny.inc.php', include $cfgPath . 'lucid.inc.php', include $cfgPath . 'hardy.inc.php', include $cfgPath . 'gentoo.inc.php', include $cfgPath . 'suse11.inc.php', include $cfgPath . 'sle10.inc.php', include $cfgPath . 'freebsd.inc.php');
|
||||
$configfiles = array_merge(include $cfgPath . 'squeeze.inc.php', include $cfgPath . 'lenny.inc.php', include $cfgPath . 'precise.inc.php', include $cfgPath . 'lucid.inc.php', include $cfgPath . 'hardy.inc.php', include $cfgPath . 'gentoo.inc.php', include $cfgPath . 'suse11.inc.php', include $cfgPath . 'sle10.inc.php', include $cfgPath . 'freebsd.inc.php');
|
||||
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
<IfModule mod_fastcgi.c>
|
||||
FastCgiWrapper /usr/lib/apache2/suexec
|
||||
FastCgiIpcDir /var/run/apache2/
|
||||
|
||||
<Location "/fastcgiphp">
|
||||
Order Deny,Allow
|
||||
Deny from All
|
||||
# Prevent accessing this path directly
|
||||
Allow from env=REDIRECT_STATUS
|
||||
</Location>
|
||||
</IfModule>
|
||||
@@ -1,8 +0,0 @@
|
||||
#
|
||||
# Set PATH, otherwise restart-scripts won't find start-stop-daemon
|
||||
#
|
||||
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
||||
#
|
||||
# Regular cron jobs for the froxlor package
|
||||
#
|
||||
*/5 * * * * root /usr/bin/php5 -q <BASE_PATH>scripts/froxlor_master_cronjob.php
|
||||
@@ -1,20 +0,0 @@
|
||||
# Make sure that `passwd`, `group` and `shadow` have mysql in their lines
|
||||
# You should place mysql at the end, so that it is queried after the other mechanisams
|
||||
#
|
||||
passwd: compat mysql
|
||||
group: compat mysql
|
||||
shadow: compat mysql
|
||||
|
||||
hosts: files dns
|
||||
networks: files dns
|
||||
|
||||
services: db files
|
||||
protocols: db files
|
||||
rpc: db files
|
||||
ethers: db files
|
||||
netmasks: files
|
||||
netgroup: files
|
||||
bootparams: files
|
||||
|
||||
automount: files
|
||||
aliases: files
|
||||
@@ -1,58 +0,0 @@
|
||||
#
|
||||
# This file is used to manage DSO modules and features.
|
||||
#
|
||||
|
||||
# This is the directory where DSO modules reside
|
||||
|
||||
ModulePath /usr/lib/proftpd
|
||||
|
||||
# Allow only user root to load and unload modules, but allow everyone
|
||||
# to see which modules have been loaded
|
||||
|
||||
ModuleControlsACLs insmod,rmmod allow user root
|
||||
ModuleControlsACLs lsmod allow user *
|
||||
|
||||
LoadModule mod_ctrls_admin.c
|
||||
LoadModule mod_tls.c
|
||||
|
||||
# Install proftpd-mod-mysql or proftpd-mod-pgsql to use this
|
||||
LoadModule mod_sql.c
|
||||
|
||||
# Install proftpd-mod-ldap to use this
|
||||
#LoadModule mod_ldap.c
|
||||
|
||||
#
|
||||
# 'SQLBackend mysql' or 'SQLBackend postgres' directives are required
|
||||
# to have SQL authorization working. You can also comment out the
|
||||
# unused module here, in alternative.
|
||||
#
|
||||
|
||||
# Install proftpd-mod-mysql to use this
|
||||
LoadModule mod_sql_mysql.c
|
||||
|
||||
# Install proftpd-mod-pgsql to use this
|
||||
#LoadModule mod_sql_postgres.c
|
||||
|
||||
#LoadModule mod_radius.c
|
||||
LoadModule mod_quotatab.c
|
||||
LoadModule mod_quotatab_file.c
|
||||
|
||||
# Install proftpd-mod-ldap to use this
|
||||
#LoadModule mod_quotatab_ldap.c
|
||||
|
||||
# Install proftpd-mod-pgsql or proftpd-mod-mysql to use this
|
||||
LoadModule mod_quotatab_sql.c
|
||||
LoadModule mod_quotatab_radius.c
|
||||
LoadModule mod_wrap.c
|
||||
LoadModule mod_rewrite.c
|
||||
LoadModule mod_load.c
|
||||
LoadModule mod_ban.c
|
||||
LoadModule mod_wrap2.c
|
||||
LoadModule mod_wrap2_file.c
|
||||
# Install proftpd-mod-pgsql or proftpd-mod-mysql to use this
|
||||
#LoadModule mod_wrap2_sql.c
|
||||
LoadModule mod_dynmasq.c
|
||||
|
||||
|
||||
# keep this module the last one
|
||||
LoadModule mod_ifsession.c
|
||||
@@ -1,131 +0,0 @@
|
||||
#
|
||||
# /etc/proftpd/proftpd.conf -- This is a basic ProFTPD configuration file.
|
||||
# To really apply changes reload proftpd after modifications.
|
||||
#
|
||||
|
||||
# Includes DSO modules
|
||||
Include /etc/proftpd/modules.conf
|
||||
|
||||
# Set off to disable IPv6 support which is annoying on IPv4 only boxes.
|
||||
UseIPv6 on
|
||||
|
||||
ServerName "<SERVERNAME> FTP Server"
|
||||
ServerType standalone
|
||||
DeferWelcome off
|
||||
|
||||
MultilineRFC2228 on
|
||||
DefaultServer on
|
||||
ShowSymlinks on
|
||||
|
||||
TimeoutNoTransfer 600
|
||||
TimeoutStalled 600
|
||||
TimeoutIdle 1200
|
||||
|
||||
DisplayLogin welcome.msg
|
||||
DisplayChdir .message true
|
||||
ListOptions "-l"
|
||||
|
||||
DenyFilter \*.*/
|
||||
|
||||
# Use this to jail all users in their homes
|
||||
# DefaultRoot ~
|
||||
|
||||
# Users require a valid shell listed in /etc/shells to login.
|
||||
# Use this directive to release that constrain.
|
||||
# RequireValidShell off
|
||||
|
||||
# Port 21 is the standard FTP port.
|
||||
Port 21
|
||||
|
||||
# In some cases you have to specify passive ports range to by-pass
|
||||
# firewall limitations. Ephemeral ports can be used for that, but
|
||||
# feel free to use a more narrow range.
|
||||
# PassivePorts 49152 65534
|
||||
|
||||
# If your host was NATted, this option is useful in order to
|
||||
# allow passive tranfers to work. You have to use your public
|
||||
# address and opening the passive ports used on your firewall as well.
|
||||
# MasqueradeAddress 1.2.3.4
|
||||
|
||||
# This is useful for masquerading address with dynamic IPs:
|
||||
# refresh any configured MasqueradeAddress directives every 8 hours
|
||||
<IfModule mod_dynmasq.c>
|
||||
# DynMasqRefresh 28800
|
||||
</IfModule>
|
||||
|
||||
# To prevent DoS attacks, set the maximum number of child processes
|
||||
# to 30. If you need to allow more than 30 concurrent connections
|
||||
# at once, simply increase this value. Note that this ONLY works
|
||||
# in standalone mode, in inetd mode you should use an inetd server
|
||||
# that allows you to limit maximum number of processes per service
|
||||
# (such as xinetd)
|
||||
MaxInstances 30
|
||||
|
||||
# Set the user and group that the server normally runs at.
|
||||
User proftpd
|
||||
Group nogroup
|
||||
|
||||
# Umask 022 is a good standard umask to prevent new files and dirs
|
||||
# (second parm) from being group and world writable.
|
||||
Umask 022 022
|
||||
# Normally, we want files to be overwriteable.
|
||||
AllowOverwrite on
|
||||
|
||||
# Uncomment this if you are using NIS or LDAP via NSS to retrieve passwords:
|
||||
# PersistentPasswd off
|
||||
|
||||
# This is required to use both PAM-based authentication and local passwords
|
||||
# AuthOrder mod_auth_pam.c* mod_auth_unix.c
|
||||
|
||||
# Be warned: use of this directive impacts CPU average load!
|
||||
# Uncomment this if you like to see progress and transfer rate with ftpwho
|
||||
# in downloads. That is not needed for uploads rates.
|
||||
#
|
||||
# UseSendFile off
|
||||
|
||||
TransferLog /var/log/proftpd/xferlog
|
||||
SystemLog /var/log/proftpd/proftpd.log
|
||||
|
||||
# Allow up- and downloads to be continued
|
||||
AllowRetrieveRestart On
|
||||
AllowStoreRestart On
|
||||
|
||||
<IfModule mod_quotatab.c>
|
||||
QuotaEngine on
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_ratio.c>
|
||||
Ratios off
|
||||
</IfModule>
|
||||
|
||||
|
||||
# Delay engine reduces impact of the so-called Timing Attack described in
|
||||
# http://security.lss.hr/index.php?page=details&ID=LSS-2004-10-02
|
||||
# It is on by default.
|
||||
<IfModule mod_delay.c>
|
||||
DelayEngine off
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_ctrls.c>
|
||||
ControlsEngine off
|
||||
ControlsMaxClients 2
|
||||
ControlsLog /var/log/proftpd/controls.log
|
||||
ControlsInterval 5
|
||||
ControlsSocket /var/run/proftpd/proftpd.sock
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_ctrls_admin.c>
|
||||
AdminControlsEngine off
|
||||
</IfModule>
|
||||
|
||||
#
|
||||
# Alternative authentication frameworks
|
||||
#
|
||||
#Include /etc/proftpd/ldap.conf
|
||||
Include /etc/proftpd/sql.conf
|
||||
|
||||
#
|
||||
# This is used for FTPS connections
|
||||
#
|
||||
#Include /etc/proftpd/tls.conf
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
<IfModule mod_sql.c>
|
||||
DefaultRoot ~
|
||||
RequireValidShell off
|
||||
AuthOrder mod_sql.c
|
||||
|
||||
SQLBackend mysql
|
||||
SQLEngine on
|
||||
SQLAuthenticate on
|
||||
|
||||
SQLAuthTypes Crypt
|
||||
SQLAuthenticate users* groups*
|
||||
SQLConnectInfo <SQL_DB>@<SQL_HOST> <SQL_UNPRIVILEGED_USER> <SQL_UNPRIVILEGED_PASSWORD>
|
||||
SQLUserInfo ftp_users username password uid gid homedir shell
|
||||
SQLGroupInfo ftp_groups groupname gid members
|
||||
SQLUserWhereClause "login_enabled = 'y'"
|
||||
|
||||
SQLLog PASS login
|
||||
SQLNamedQuery login UPDATE "last_login=now(), login_count=login_count+1 WHERE username='%u'" ftp_users
|
||||
|
||||
SQLLog RETR download
|
||||
SQLNamedQuery download UPDATE "down_count=down_count+1, down_bytes=down_bytes+%b WHERE username='%u'" ftp_users
|
||||
|
||||
SQLLog STOR upload
|
||||
SQLNamedQuery upload UPDATE "up_count=up_count+1, up_bytes=up_bytes+%b WHERE username='%u'" ftp_users
|
||||
|
||||
QuotaEngine on
|
||||
QuotaShowQuotas on
|
||||
QuotaDisplayUnits Mb
|
||||
QuotaLock /var/lock/ftpd.quotatab.lock
|
||||
QuotaLimitTable sql:/get-quota-limit
|
||||
QuotaTallyTable sql:/get-quota-tally/update-quota-tally/insert-quota-tally
|
||||
SQLNamedQuery get-quota-limit SELECT "ftp_users.username AS name, ftp_quotalimits.quota_type, ftp_quotalimits.per_session, ftp_quotalimits.limit_type, panel_customers.diskspace*1024 AS bytes_in_avail, ftp_quotalimits.bytes_out_avail, ftp_quotalimits.bytes_xfer_avail, ftp_quotalimits.files_in_avail, ftp_quotalimits.files_out_avail, ftp_quotalimits.files_xfer_avail FROM ftp_users, ftp_quotalimits, panel_customers WHERE ftp_users.username = '%{0}' AND panel_customers.loginname = SUBSTRING_INDEX('%{0}', 'ftp', 1) AND quota_type ='%{1}'"
|
||||
SQLNamedQuery get-quota-tally SELECT "name, quota_type, bytes_in_used,bytes_out_used, bytes_xfer_used, files_in_used, files_out_used,files_xfer_used FROM ftp_quotatallies WHERE name = '%{0}' AND quota_type = '%{1}'"
|
||||
SQLNamedQuery update-quota-tally UPDATE "bytes_in_used = bytes_in_used + %{0}, bytes_out_used = bytes_out_used + %{1}, bytes_xfer_used = bytes_xfer_used + %{2}, files_in_used = files_in_used + %{3}, files_out_used= files_out_used + %{4}, files_xfer_used = files_xfer_used + %{5} WHERE name= '%{6}' AND quota_type = '%{7}'" ftp_quotatallies
|
||||
SQLNamedQuery insert-quota-tally INSERT "%{0}, %{1}, %{2}, %{3}, %{4},%{5}, %{6}, %{7}" ftp_quotatallies
|
||||
|
||||
</IfModule>
|
||||
@@ -1,5 +0,0 @@
|
||||
STANDALONE_OR_INETD=standalone
|
||||
VIRTUALCHROOT=false
|
||||
UPLOADSCRIPT=
|
||||
UPLOADUID=
|
||||
UPLOADGID=
|
||||
@@ -1 +0,0 @@
|
||||
21
|
||||
@@ -1 +0,0 @@
|
||||
yes
|
||||
@@ -1 +0,0 @@
|
||||
1
|
||||
@@ -1 +0,0 @@
|
||||
15
|
||||
@@ -1 +0,0 @@
|
||||
1000
|
||||
@@ -1 +0,0 @@
|
||||
/etc/pure-ftpd/db/mysql.conf
|
||||
@@ -1 +0,0 @@
|
||||
yes
|
||||
@@ -1 +0,0 @@
|
||||
no
|
||||
@@ -1,11 +0,0 @@
|
||||
MYSQLServer <SQL_HOST>
|
||||
MYSQLUser <SQL_UNPRIVILEGED_USER>
|
||||
MYSQLPassword <SQL_UNPRIVILEGED_PASSWORD>
|
||||
MYSQLDatabase <SQL_DB>
|
||||
MYSQLCrypt any
|
||||
|
||||
MYSQLGetPW SELECT password FROM ftp_users WHERE username="\L" AND login_enabled="y"
|
||||
MYSQLGetUID SELECT uid FROM ftp_users WHERE username="\L" AND login_enabled="y"
|
||||
MYSQLGetGID SELECT gid FROM ftp_users WHERE username="\L" AND login_enabled="y"
|
||||
MYSQLGetDir SELECT homedir FROM ftp_users WHERE username="\L" AND login_enabled="y"
|
||||
MySQLGetQTASZ SELECT panel_customers.diskspace/1024 AS QuotaSize FROM panel_customers, ftp_users WHERE username = "\L" AND panel_customers.loginname = SUBSTRING_INDEX('\L', 'ftp', 1)
|
||||
@@ -1,2 +0,0 @@
|
||||
username <SQL_UNPRIVILEGED_USER>
|
||||
password <SQL_UNPRIVILEGED_PASSWORD>
|
||||
@@ -1,41 +0,0 @@
|
||||
getpwnam SELECT username,'x',uid,gid,'MySQL User',homedir,shell \
|
||||
FROM ftp_users \
|
||||
WHERE username='%1$s' \
|
||||
AND login_enabled = 'Y' \
|
||||
LIMIT 1
|
||||
getpwuid SELECT username,'x',uid,gid,'MySQL User',homedir,shell \
|
||||
FROM ftp_users \
|
||||
WHERE uid='%1$u' \
|
||||
AND login_enabled = 'Y' \
|
||||
LIMIT 1
|
||||
getspnam SELECT username,password,FLOOR(UNIX_TIMESTAMP()/86400-1),'1','99999','7','-1','-1','0' \
|
||||
FROM ftp_users \
|
||||
WHERE username='%1$s' \
|
||||
AND login_enabled = 'Y' \
|
||||
LIMIT 1
|
||||
getpwent SELECT username,'x',uid,gid,'MySQL User',homedir,shell \
|
||||
FROM ftp_users
|
||||
getspent SELECT username,password,FLOOR(UNIX_TIMESTAMP()/86400-1),'1','99999','7','-1','-1','0' \
|
||||
FROM ftp_users
|
||||
getgrnam SELECT groupname,'x',gid \
|
||||
FROM ftp_groups \
|
||||
WHERE groupname='%1$s' \
|
||||
LIMIT 1
|
||||
getgrgid SELECT groupname,'x',gid \
|
||||
FROM ftp_groups \
|
||||
WHERE gid='%1$u' \
|
||||
LIMIT 1
|
||||
getgrent SELECT groupname,'x',gid \
|
||||
FROM ftp_groups
|
||||
memsbygid SELECT username \
|
||||
FROM ftp_users \
|
||||
WHERE gid='%1$u'
|
||||
gidsbymem SELECT gid \
|
||||
FROM ftp_users \
|
||||
WHERE username='%1$s'
|
||||
|
||||
host <SQL_HOST>
|
||||
database <SQL_DB>
|
||||
username <SQL_UNPRIVILEGED_USER>
|
||||
password <SQL_UNPRIVILEGED_PASSWORD>
|
||||
socket /var/run/mysqld/mysqld.sock
|
||||
Reference in New Issue
Block a user