]> git.sesse.net Git - betaftpd/blob - doc/README.nonroot
Fixed a security problem where the custom snprintf() would always be used. Thanks...
[betaftpd] / doc / README.nonroot
1 Experimental support for running BetaFTPD without being root (0.0.8)
2
3 Note: THIS IS CODE IN TESTING, AND SHOULD NOT BE CONSIDERED A STABLE
4 PART OF BETAFTPD IN ANY WAY. (Sorry for the shouting, it was just
5 in case you were deaf. Well, now you are anyway...)
6
7 BetaFTPD now has support (ahem) for running without root privilegies.
8 When not running as root, you can't piggyback on the OS anymore, and
9 have to employ some extra sort of database. More on this later. 
10
11 This is currently just a hack, with a lot of stuff missing, and lots of
12 debugging messages still being in. The reason I want to release it in
13 this verson, is to get feedback from any users (hello! where are
14 you?) :-)
15
16 There are several things you must do to get nonroot support working:
17 1. configure BetaFTPD with `--enable-nonroot'.
18 2. Define FTP_PORT in ftpd.h to a port over 1024. The default setting
19    for nonroot users is 12121, so make sure it is available, or choose
20    another one. Be aware that anybody may pinch this port if you're
21    not holding on to it...
22 3. Set up a `betaftpd.users' file in GLOBAL_ROOT_DIR, with the following
23    format:
24
25 uid     username        password        homedir         rootdir         gid(s)
26
27 uid:            The user's uid (note that these fields do NOT have to match those
28                 in /etc/passwd, you're your own boss here).
29 username:       The user's username, of course.
30 password:       The password, encrypted with crypt().
31 homedir:        The directory the user starts in. MUST BE UNDER ROOTDIR.
32 rootdir:        The directory the user sees as /. (Note that homedir and
33                 rootdir is seen from a chroot()ed perspective. So if
34                 you had set GLOBAL_ROOT_DIR to be `/betaftpd' and wanted
35                 a user to have the home directory `/betaftpd/foo/', you
36                 would use just `/foo/'.)
37
38                 Both directory names must be ended with a slash (/).
39 gids:           Any groups the user is member of, separated with a space.
40                 Should be at least one.
41
42 Note: No blank lines or comments allowed. The fields are in a bit unusual
43 order. This is to reduce parsing overhead.
44
45 4. Set up a `betaftpd.groups' file in GLOBAL_ROOT_DIR, with the following
46    format:
47
48 gid     groupname
49
50 These fields should be self-explanatory.
51
52 5. Set up a `.rights' file in every directory you want to be accessible.
53    More details are in the file `README.rights'.
54
55 I hope to add a GUI for all this one day, but for now it is more important
56 for me to concentrate on the core development of BetaFTPD.
57
58 Good luck!
59
60 /* Steinar */