mirror of
https://github.com/EngineGPDev/ProFTPD.git
synced 2025-01-18 13:52:21 +03:00
Merge pull request #1 from EngineGPDev/Uploading-files-by-default
Uploading files by default
This commit is contained in:
commit
8acd1ba65c
54
modules.conf
Normal file
54
modules.conf
Normal file
@ -0,0 +1,54 @@
|
||||
ModulePath /usr/lib/proftpd
|
||||
ModuleControlsACLs insmod,rmmod allow user root
|
||||
ModuleControlsACLs lsmod allow user *
|
||||
|
||||
LoadModule mod_ctrls_admin.c
|
||||
LoadModule mod_tls.c
|
||||
LoadModule mod_sql.c
|
||||
|
||||
#LoadModule mod_ldap.c
|
||||
LoadModule mod_sql_mysql.c
|
||||
#LoadModule mod_sql_postgres.c
|
||||
#LoadModule mod_sql_sqlite.c
|
||||
#LoadModule mod_sql_odbc.c
|
||||
#LoadModule mod_sql_passwd.c
|
||||
|
||||
LoadModule mod_radius.c
|
||||
LoadModule mod_quotatab.c
|
||||
LoadModule mod_quotatab_file.c
|
||||
|
||||
|
||||
#LoadModule mod_quotatab_ldap.c
|
||||
#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
|
||||
|
||||
LoadModule mod_wrap2_sql.c
|
||||
|
||||
LoadModule mod_dynmasq.c
|
||||
LoadModule mod_exec.c
|
||||
LoadModule mod_shaper.c
|
||||
LoadModule mod_ratio.c
|
||||
LoadModule mod_site_misc.c
|
||||
LoadModule mod_sftp.c
|
||||
LoadModule mod_sftp_pam.c
|
||||
|
||||
|
||||
LoadModule mod_sftp_sql.c
|
||||
|
||||
|
||||
LoadModule mod_facl.c
|
||||
LoadModule mod_unique_id.c
|
||||
#LoadModule mod_copy.c
|
||||
LoadModule mod_deflate.c
|
||||
LoadModule mod_ifversion.c
|
||||
LoadModule mod_tls_memcache.c
|
||||
LoadModule mod_ifsession.c
|
||||
|
91
proftpd.conf
Normal file
91
proftpd.conf
Normal file
@ -0,0 +1,91 @@
|
||||
Include /etc/proftpd/modules.conf
|
||||
|
||||
UseIPv6 on
|
||||
<IfModule mod_ident.c>
|
||||
IdentLookups off
|
||||
</IfModule>
|
||||
|
||||
ServerName "Debian"
|
||||
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 \*.*/
|
||||
|
||||
DefaultRoot ~
|
||||
|
||||
Port 21
|
||||
UseReverseDNS off
|
||||
PassivePorts 49152 65534
|
||||
|
||||
|
||||
MaxInstances 30
|
||||
|
||||
User proftpd
|
||||
Group nogroup
|
||||
|
||||
Umask 022 022
|
||||
|
||||
AllowOverwrite on
|
||||
|
||||
TransferLog /var/log/proftpd/xferlog
|
||||
SystemLog /var/log/proftpd/proftpd.log
|
||||
|
||||
<IfModule mod_quotatab.c>
|
||||
QuotaEngine off
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_ratio.c>
|
||||
Ratios off
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_delay.c>
|
||||
DelayEngine on
|
||||
</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>
|
||||
|
||||
Include /etc/proftpd/conf.d/
|
||||
|
||||
Include /etc/proftpd/sql.conf
|
||||
|
||||
AuthOrder mod_sql.c
|
||||
|
||||
<Directory ~/>
|
||||
AllowOverwrite on
|
||||
|
||||
<Limit Write>
|
||||
AllowAll
|
||||
</Limit>
|
||||
|
||||
<Limit READ>
|
||||
AllowAll
|
||||
</Limit>
|
||||
|
||||
DenyFilter ^(\..+|samp.+|server\.properties|srcds_.+|steam|.+\.sh|hlds_.+|hltv.*|.+\.cmds|usermodel\.amxx|console\.log|start\.jar)$
|
||||
HideFiles ^(\..+|samp.+|server\.properties|srcds_.+|steam|.+\.sh|hlds_.+|hltv.*|.+\.cmds|usermodel\.amxx|console\.log|start\.jar)$
|
||||
PathDenyFilter ^(\..+|samp.+|server\.properties|srcds_.+|steam|.+\.sh|hlds_.+|hltv.*|.+\.cmds|usermodel\.amxx|start\.jar)$
|
||||
</Directory>
|
||||
|
||||
RequireValidShell off
|
23
sql.conf
Normal file
23
sql.conf
Normal file
@ -0,0 +1,23 @@
|
||||
<IfModule mod_sql.c>
|
||||
SQLBackend mysql
|
||||
SQLEngine on
|
||||
SQLAuthTypes Plaintext
|
||||
SQLConnectInfo ftp@localhost:3306 root passwdfor
|
||||
SQLUserInfo users username password uid gid homedir shell
|
||||
SQLAuthenticate users*
|
||||
SQLMinUserUID 33
|
||||
SQLMinUserGID 33
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_quotatab.c>
|
||||
QuotaEngine on
|
||||
QuotaDirectoryTally on
|
||||
QuotaDisplayUnits Mb
|
||||
QuotaShowQuotas on
|
||||
SQLNamedQuery get-quota-limit SELECT "name, quota_type, per_session, limit_type, bytes_in_avail, bytes_out_avail, bytes_xfer_avail, files_in_avail, files_out_avail, files_xfer_avail FROM quotalimits WHERE name = '%{0}' 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 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}'" quotatallies
|
||||
SQLNamedQuery insert-quota-tally INSERT "%{0}, %{1}, %{2}, %{3}, %{4}, %{5}, %{6}, %{7}" quotatallies
|
||||
QuotaLimitTable sql:/get-quota-limit
|
||||
QuotaTallyTable sql:/get-quota-tally/update-quota-tally/insert-quota-tally
|
||||
</IfModule>
|
86
sqldump.sql
Normal file
86
sqldump.sql
Normal file
@ -0,0 +1,86 @@
|
||||
-- phpMyAdmin SQL Dump
|
||||
-- version 4.2.12deb2+deb8u5
|
||||
-- http://www.phpmyadmin.net
|
||||
--
|
||||
-- Хост: localhost
|
||||
-- Время создания: Мар 23 2019 г., 22:32
|
||||
-- Версия сервера: 5.6.43
|
||||
-- Версия PHP: 5.6.40-0+deb8u1
|
||||
|
||||
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
||||
SET time_zone = "+00:00";
|
||||
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||
/*!40101 SET NAMES utf8 */;
|
||||
|
||||
--
|
||||
-- База данных: `ftp`
|
||||
--
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Структура таблицы `quotalimits`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `quotalimits` (
|
||||
`name` varchar(30) DEFAULT NULL,
|
||||
`quota_type` enum('user','group','class','all') NOT NULL,
|
||||
`per_session` enum('false','true') NOT NULL,
|
||||
`limit_type` enum('soft','hard') NOT NULL,
|
||||
`bytes_in_avail` float NOT NULL DEFAULT '0',
|
||||
`bytes_out_avail` float NOT NULL DEFAULT '0',
|
||||
`bytes_xfer_avail` float NOT NULL DEFAULT '0',
|
||||
`files_in_avail` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`files_out_avail` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`files_xfer_avail` int(10) unsigned NOT NULL DEFAULT '0'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Структура таблицы `quotatallies`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `quotatallies` (
|
||||
`name` varchar(30) NOT NULL,
|
||||
`quota_type` enum('user','group','class','all') NOT NULL,
|
||||
`bytes_in_used` float NOT NULL DEFAULT '0',
|
||||
`bytes_out_used` float NOT NULL DEFAULT '0',
|
||||
`bytes_xfer_used` float NOT NULL DEFAULT '0',
|
||||
`files_in_used` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`files_out_used` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`files_xfer_used` int(10) unsigned NOT NULL DEFAULT '0'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Структура таблицы `users`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `users` (
|
||||
`username` varchar(32) NOT NULL,
|
||||
`password` varchar(32) NOT NULL,
|
||||
`uid` int(11) NOT NULL,
|
||||
`gid` int(11) NOT NULL DEFAULT '1000',
|
||||
`homedir` varchar(255) NOT NULL,
|
||||
`shell` varchar(255) NOT NULL DEFAULT '/bin/false'
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
--
|
||||
-- Индексы сохранённых таблиц
|
||||
--
|
||||
|
||||
--
|
||||
-- Индексы таблицы `users`
|
||||
--
|
||||
ALTER TABLE `users`
|
||||
ADD UNIQUE KEY `username` (`username`);
|
||||
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
Loading…
Reference in New Issue
Block a user