"Fossies" - the Fresh Open Source Software Archive 
Member "proma-0.8.3/docs/INSTALL" (15 Jul 2004, 4081 Bytes) of package /linux/privat/old/proma-0.8.3.tar.gz:
As a special service "Fossies" has tried to format the requested text file into HTML format (style:
standard) with prefixed line numbers.
Alternatively you can here
view or
download the uninterpreted source code file.
1 ProMA (ProFTPd MySQL Admin)
2 ===========================
3 $Id: INSTALL,v 1.1 2004/07/15 22:59:08 jodal Exp $
4
5 INSTALL
6 =======
7
8 ProMA in 1, 2, 3 (and 4)
9
10 CONTENTS
11 --------
12 1. ProFTPd and MySQL
13 2. Database setup
14 2.1. 'users' table
15 2.2. Create an admin
16 3. ProMA configuration
17 4. Enjoy
18
19
20 1. PROFTPD AND MYSQL
21 --------------------
22 Install ProFTPd and MySQL as described in their respective documentation.
23
24 MySQL -> http://www.mysql.com/
25 ProFTPd -> http://www.proftpd.org/
26 mod_sql for ProFTPd -> http://www.lastditcheffort.org/~aah/proftpd/mod_sql/
27
28 The SQL-part from my proftpd.conf:
29
30 SQLConnectInfo database@127.0.0.1 user password
31 SQLAuthenticate users
32 SQLAuthTypes backend
33 SQLDefaultHomedir /some/fancy/homedir
34 SQLUserInfo users userid passwd uid gid homedir shell
35 SQLGroupInfo groups groupname gid members
36 SQLLog PASS updatecount
37 SQLNamedQuery updatecount UPDATE "count=count+1 WHERE userid='%u'" users
38
39 The two last lines are needed for the login counter.
40 Check the mod_sql documentation or
41 http://www.proftpd.org/docs/directives/linked/config_ref_mod_sql.html
42 for further information.
43
44
45 2. DATABASE SETUP
46 -----------------
47 Modify the users table, create the newusers table and an initial admin.
48 Run these queries in the mysql client or in fx. phpMyAdmin.
49
50 2.1 'users' table
51 -----------------
52 mod_sql's README recommends this setup:
53
54 COLUMN TYPE R DUP NULL? USE
55 ---------------------------------------------------------
56 userid text Y N N user's login id
57 passwd text Y Y N user's password
58 uid num N N Y user's uid
59 gid num N Y Y user's gid
60 homedir text N Y Y user's homedir
61 shell text N Y Y user's shell
62
63 ProMA uses these column names as default, so if you use this setup you don't
64 have to change that in the config. Additionally ProMA needs these columns in
65 the user table:
66
67 COLUMN TYPE R DUP NULL? USE
68 ---------------------------------------------------------
69 name text Y Y Y user's full real name
70 mail text Y Y Y user's mail address
71 note text N Y Y note about user
72 count num N Y Y user's login counter
73 admin num N Y Y user's admin status
74 closed num N Y Y account closed/open
75
76 You can create this table with this query:
77
78 CREATE TABLE users (
79 userid varchar(255) NOT NULL UNIQUE,
80 name varchar(255) NULL,
81 mail varchar(255) NULL,
82 uid int(11) NULL default '65534',
83 gid int(11) NULL default '65534',
84 passwd varchar(255) NOT NULL,
85 shell varchar(255) NOT NULL default '/bin/nonexistent',
86 homedir varchar(255) NOT NULL default '/some/fancy/homedir',
87 note text NULL default '',
88 count int(11) NOT NULL default 0,
89 admin int(1) NOT NULL default 0,
90 closed int(1) NOT NULL default 0
91 );
92
93 2.2 Make an admin
94 -----------------
95 Admin status is required for using the admin section of ProMA.
96 Thus, you need at least one initial admin:
97
98 INSERT INTO
99 users
100 SET
101 userid = 'my_account_name',
102 passwd = PASSWORD('my_password'),
103 name = 'The Boss',
104 mail = 'boss@my.ftp',
105 admin = 1;
106
107 Or, if you already have an existing user you want to upgrade to
108 an admin:
109
110 UPDATE
111 users
112 SET
113 admin = 1
114 WHERE
115 userid = 'my_account_name';
116
117 You can add more admins once you're logged into the admin section.
118
119
120 3. PROMA CONFIGURATION
121 ----------------------
122 Copy 'config.inc.php-example' to 'config.inc.php' and edit it to fit your
123 setup and needs. There are more instructions in the configuration file.
124
125 'config.inc.php' should not be world readable because it carries the password
126 to the MySQL database. For example, it is recommended (on a Debian system) to
127 run 'chgrp www-data config.inc.php' and 'chmod 640 config.inc.php'.
128
129
130 4. ENJOY
131 --------
132 Point your browser at the URL you installed ProMA at and enjoy.
133
134
135 EOF