commit | author | age
|
b4c750
|
1 |
############################################## |
T |
2 |
# # |
|
3 |
# Sample Pure-FTPd Mysql configuration file. # |
|
4 |
# See README.MySQL for explanations. # |
|
5 |
# # |
|
6 |
############################################## |
|
7 |
|
|
8 |
|
|
9 |
# Optional : MySQL server name or IP. Don't define this for unix sockets. |
|
10 |
|
|
11 |
MYSQLServer {mysql_server_ip} |
|
12 |
|
|
13 |
|
|
14 |
# Optional : MySQL port. Don't define this if a local unix socket is used. |
|
15 |
|
|
16 |
# MYSQLPort 3306 |
|
17 |
|
|
18 |
|
|
19 |
# Optional : define the location of mysql.sock if the server runs on this host. |
|
20 |
|
|
21 |
# MYSQLSocket /var/run/mysqld/mysqld.sock |
|
22 |
|
|
23 |
|
|
24 |
# Mandatory : user to bind the server as. |
|
25 |
|
|
26 |
MYSQLUser {mysql_server_ispconfig_user} |
|
27 |
|
|
28 |
|
|
29 |
# Mandatory : user password. You must have a password. |
|
30 |
|
|
31 |
MYSQLPassword {mysql_server_ispconfig_password} |
|
32 |
|
|
33 |
|
|
34 |
# Mandatory : database to open. |
|
35 |
|
|
36 |
MYSQLDatabase {mysql_server_database} |
|
37 |
|
|
38 |
|
|
39 |
# Mandatory : how passwords are stored |
|
40 |
# Valid values are : "cleartext", "crypt", "md5" and "password" |
|
41 |
# ("password" = MySQL password() function) |
|
42 |
# You can also use "any" to try "crypt", "md5" *and* "password" |
|
43 |
|
|
44 |
MYSQLCrypt crypt |
|
45 |
|
|
46 |
|
|
47 |
# In the following directives, parts of the strings are replaced at |
|
48 |
# run-time before performing queries : |
|
49 |
# |
|
50 |
# \L is replaced by the login of the user trying to authenticate. |
|
51 |
# \I is replaced by the IP address the user connected to. |
|
52 |
# \P is replaced by the port number the user connected to. |
|
53 |
# \R is replaced by the IP address the user connected from. |
|
54 |
# \D is replaced by the remote IP address, as a long decimal number. |
|
55 |
# |
|
56 |
# Very complex queries can be performed using these substitution strings, |
|
57 |
# especially for virtual hosting. |
|
58 |
|
|
59 |
|
|
60 |
# Query to execute in order to fetch the password |
|
61 |
|
f59fe4
|
62 |
MYSQLGetPW SELECT password FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND username="\L" AND (expires IS NULL OR expires="0000-00-00 00:00:00" OR expires > NOW()) |
b4c750
|
63 |
|
T |
64 |
|
|
65 |
# Query to execute in order to fetch the system user name or uid |
|
66 |
|
f59fe4
|
67 |
MYSQLGetUID SELECT uid FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND username="\L" AND (expires IS NULL OR expires="0000-00-00 00:00:00" OR expires > NOW()) |
b4c750
|
68 |
|
T |
69 |
|
|
70 |
# Optional : default UID - if set this overrides MYSQLGetUID |
|
71 |
|
|
72 |
#MYSQLDefaultUID 1000 |
|
73 |
|
|
74 |
|
|
75 |
# Query to execute in order to fetch the system user group or gid |
|
76 |
|
f59fe4
|
77 |
MYSQLGetGID SELECT gid FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND username="\L" AND (expires IS NULL OR expires="0000-00-00 00:00:00" OR expires > NOW()) |
b4c750
|
78 |
|
T |
79 |
|
|
80 |
# Optional : default GID - if set this overrides MYSQLGetGID |
|
81 |
|
|
82 |
#MYSQLDefaultGID 1000 |
|
83 |
|
|
84 |
|
|
85 |
# Query to execute in order to fetch the home directory |
|
86 |
|
f59fe4
|
87 |
MYSQLGetDir SELECT dir FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND username="\L" AND (expires IS NULL OR expires="0000-00-00 00:00:00" OR expires > NOW()) |
b4c750
|
88 |
|
T |
89 |
|
|
90 |
# Optional : query to get the maximal number of files |
|
91 |
# Pure-FTPd must have been compiled with virtual quotas support. |
|
92 |
|
f59fe4
|
93 |
MySQLGetQTAFS SELECT quota_files FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND quota_files != '-1' AND username="\L" AND (expires IS NULL OR expires="0000-00-00 00:00:00" OR expires > NOW()) |
b4c750
|
94 |
|
T |
95 |
|
|
96 |
# Optional : query to get the maximal disk usage (virtual quotas) |
|
97 |
# The number should be in Megabytes. |
|
98 |
# Pure-FTPd must have been compiled with virtual quotas support. |
|
99 |
|
f59fe4
|
100 |
MySQLGetQTASZ SELECT quota_size FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND quota_size != '-1' AND username="\L" AND (expires IS NULL OR expires="0000-00-00 00:00:00" OR expires > NOW()) |
b4c750
|
101 |
|
T |
102 |
|
|
103 |
# Optional : ratios. The server has to be compiled with ratio support. |
|
104 |
|
f59fe4
|
105 |
MySQLGetRatioUL SELECT ul_ratio FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND ul_ratio != '-1' AND username="\L" AND (expires IS NULL OR expires="0000-00-00 00:00:00" OR expires > NOW()) |
AT |
106 |
MySQLGetRatioDL SELECT dl_ratio FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND dl_ratio != '-1' AND username="\L" AND (expires IS NULL OR expires="0000-00-00 00:00:00" OR expires > NOW()) |
b4c750
|
107 |
|
T |
108 |
|
|
109 |
# Optional : bandwidth throttling. |
|
110 |
# The server has to be compiled with throttling support. |
|
111 |
# Values are in KB/s . |
|
112 |
|
f59fe4
|
113 |
MySQLGetBandwidthUL SELECT ul_bandwidth FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND ul_bandwidth != '-1' AND username="\L" AND (expires IS NULL OR expires="0000-00-00 00:00:00" OR expires > NOW()) |
AT |
114 |
MySQLGetBandwidthDL SELECT dl_bandwidth FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND dl_bandwidth != '-1' AND username="\L" AND (expires IS NULL OR expires="0000-00-00 00:00:00" OR expires > NOW()) |
b4c750
|
115 |
|
T |
116 |
# Enable ~ expansion. NEVER ENABLE THIS BLINDLY UNLESS : |
|
117 |
# 1) You know what you are doing. |
|
118 |
# 2) Real and virtual users match. |
|
119 |
|
|
120 |
# MySQLForceTildeExpansion 1 |
|
121 |
|
|
122 |
|
|
123 |
# If you upgraded your tables to transactionnal tables (Gemini, |
|
124 |
# BerkeleyDB, Innobase...), you can enable SQL transactions to |
|
125 |
# avoid races. Leave this commented if you are using the |
|
126 |
# traditionnal MyIsam databases or old (< 3.23.x) MySQL versions. |
|
127 |
|
55d599
|
128 |
MySQLTransactions On |