Debian Codegraph @

doc/contrib/mod_sql_sqlite.html

raw symbols SCIP
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>ProFTPD module mod_sql_sqlite</title>
5 </head>
6
7 <body bgcolor=white>
8
9 <hr><br>
10 <center>
11 <h2><b>ProFTPD module <code>mod_sql_sqlite</code></b></h2>
12 </center>
13 <hr><br>
14
15 <p>
16 SQLite is a lightweight embeddable database system that is gaining in
17 popularity. More details can be found here:
18 <pre>
19 <a href="http://www.sqlite.org/">http://www.sqlite.org</a>
20 </pre>
21
22 <p>
23 The <code>mod_sql_sqlite</code> module is designed to let ProFTPD's
24 <code>mod_sql</code> module connect to and use a SQLite database. This module
25 is contained in the <code>mod_sql_sqlite.c</code> file for ProFTPD 1.3.<i>x</i>,
26 and is not compiled by default. Installation instructions are discussed
27 <a href="#Installation">here</a>.
28
29 <p>
30 The most current version of <code>mod_sql_sqlite</code> is distributed with
31 ProFTPD.
32
33 <h2>Author</h2>
34 <p>
35 Please contact TJ Saunders &lt;tj <i>at</i> castaglia.org&gt; with any
36 questions, concerns, or suggestions regarding this module.
37
38 <p>
39 <hr>
40 <h2><a name="Installation">Installation</a></h2>
41 The <code>mod_sql_sqlite</code> modules requires that SQLite be installed.
42
43 <p>
44 After installing SQLite, follow the usual steps for using contrib modules in
45 ProFTPD, making sure to list <code>mod_sql</code>:
46 <pre>
47 $ ./configure --with-modules=mod_sql:mod_sql_sqlite
48 $ make
49 $ make install
50 </pre>
51 You may need to specify the location of the SQLite header and library files in
52 your <code>configure</code> command, <i>e.g.</i>:
53 <pre>
54 $ ./configure --with-modules=mod_sql:mod_sql_sqlite \
55 --with-includes=/usr/local/sqlite/include \
56 --with-libraries=/usr/local/sqlite/lib
57 </pre>
58
59 <p>
60 Alternatively, if your <code>proftpd</code> was compiled with DSO support, you
61 can use the <code>prxs</code> tool to build <code>mod_sql_sqlite</code> as
62 a shared module:
63 <pre>
64 $ prxs -c -i -d mod_sql_sqlite.c
65 </pre>
66
67 <p>
68 <hr>
69 <h2><a name="Usage">Usage</a></h2>
70 For the most part, <code>mod_sql_sqlite</code> requires little configuration.
71 In the <code>SQLConnectInfo</code> directive, simply use the full path
72 to the SQLite database file; no username or password are required. The
73 <code>SQLBackend</code> provided by <code>mod_sql_sqlite</code> is "sqlite3".
74
75 <p>
76 For example:
77 <pre>
78 &lt;IfModule mod_sql_sqlite.c&gt;
79 SQLBackend sqlite3
80 SQLConnectInfo /path/to/ftpd.db
81 &lt;/IfModule&gt;
82 </pre>
83
84 <p>
85 Note that due to the way that <code>mod_sql_sqlite</code> implements database
86 transactions (e.g. <code>INSERT</code> and <code>UPDATE</code> SQL statements
87 for <code>SQLLog</code> directives), SQLite-3.6.5 or later is <b>required</b>
88 in order for <code>mod_sql_sqlite</code> to support <code>SQLLog</code>
89 directives if <code>DefaultRoot</code> or <code>&lt;Anonymous&gt;</code> are
90 used. (SQLite-3.6.5 and later support the MEMORY journal mode, which is
91 needed for supporting the <code>SQLLog</code> directives in a chrooted
92 process.)
93
94 <p>
95 Once you have your SQLite database file created, you can follow the rest
96 of the instructions in the <a href="../../howto/SQL.html">SQL howto</a>
97 for creating the schema for user/group authentication.
98
99 <p>
100 <hr>
101 <font size=2><b><i>
102 &copy; Copyright 2004-2020 TJ Saunders<br>
103 All Rights Reserved<br>
104 </i></b></font>
105 <hr>
106
107 </body>
108 </html>