libsodium: Needed for Dnscrypto-proxy Release 1.3.0
[tomato.git] / release / src / router / vsftpd / INSTALL
blob4f811aa58eb7709fea5acdf2f61fdfd94e360940
1 INSTALL
2 =======
4 This file details how to build and install / run vsftpd from the vsftpd
5 distribution .tar.gz file.
7 Step 1) Build vsftpd.
9 Switch to the directory created when you unpacked the vsftpd .tar.gz file.
10 e.g.:
12 cd vsftpd-1.1.2
14 edit "builddefs.h" to handle compile-time settings (tcp_wrappers build,
15 etc).
17 Just type "make" (and mail me to fix it if it doesn't build ;-).
18 This should produce you a vsftpd binary. You can test for this, e.g.:
20 [chris@localhost vsftpd]$ ls -l vsftpd
21 -rwxrwxr-x    1 chris    chris       61748 Sep 27 00:26 vsftpd
23 Step 2) Satisfy vsftpd pre-requisites
24 2a) vsftpd needs the user "nobody" in the default configuration. Add this
25 user in case it does not already exist. e.g.:
27 [root@localhost root]# useradd nobody
28 useradd: user nobody exists
30 2b) vsftpd needs the (empty) directory /usr/share/empty in the default
31 configuration. Add this directory in case it does not already exist. e.g.:
33 [root@localhost root]# mkdir /usr/share/empty/
34 mkdir: cannot create directory `/usr/share/empty': File exists
36 2c) For anonymous FTP, you will need the user "ftp" to exist, and have a
37 valid home directory (which is NOT owned or writable by the user "ftp").
38 The following commands could be used to set up the user "ftp" if you do not
39 have one:
41 [root@localhost root]# mkdir /var/ftp/
42 [root@localhost root]# useradd -d /var/ftp ftp
44 (the next two are useful to run even if the user "ftp" already exists).
45 [root@localhost root]# chown root.root /var/ftp
46 [root@localhost root]# chmod og-w /var/ftp
48 Step 3) Install vsftpd config file, executable, man page, etc.
50 Running "make install" will try to copy the binary, man pages, etc. to
51 somewhere sensible.
52 Or you might want to copy these things by hand, e.g.:
53 cp vsftpd /usr/local/sbin/vsftpd
54 cp vsftpd.conf.5 /usr/local/man/man5
55 cp vsftpd.8 /usr/local/man/man8
57 "make install" doesn't copy the sample config file. It is recommended you
58 do this:
59 cp vsftpd.conf /etc
61 Step 4) Smoke test (without an inetd).
63 vsftpd can run standalone or via an inetd (such as inetd or xinetd). You will
64 typically get more control running vsftpd from an inetd. But first we will run
65 it without, so we can check things are going well so far.
66 Edit /etc/vsftpd.conf, and add this line at the bottom:
68 listen=YES
70 This tells vsftpd it will NOT be running from inetd.
71 Right, now let's try and run it!
72 Log in as root.
73 Make sure you are not running other FTP servers (or vsftpd will not be able
74 to use the FTP port, 21).
75 Run the binary from wherever you put it, e.g.:
77 [root@localhost root]# /usr/local/sbin/vsftpd &
78 [1] 2104
80 If all is well, you can now connect! e.g.:
82 [chris@localhost chris]$ ftp localhost
83 Connected to localhost (127.0.0.1).
84 220 (vsFTPd 1.1.1)
85 Name (localhost:chris): ftp
86 331 Please specify the password.
87 Password:
88 230 Login successful. Have fun.
89 Remote system type is UNIX.
90 Using binary mode to transfer files.
91 ftp> ls
92 227 Entering Passive Mode (127,0,0,1,229,133)
93 150 Here comes the directory listing.
94 d--x--x--x    2 0        0            4096 Jan 14  2002 bin
95 d--x--x--x    2 0        0            4096 Apr 21 20:52 etc
96 drwxr-xr-x    2 0        0            4096 Apr 21 20:52 lib
97 drwxr-sr-x    2 0        50           4096 Jul 26 22:58 pub
98 226 Directory send OK.
99 ftp>
101 Step 5) Run from an inetd of some kind (optional - standalone mode is now
102 recommended)
104 You may want to run the binary from an inetd of some kind, because this can
105 give you extra features - e.g. xinetd has a lot of settings. (Note that
106 vsftpd's inbuilt listener covers most of the more useful xinetd settings).
108 5a) If using standard "inetd", you will need to edit /etc/inetd.conf, and add
109 a line such as:
111 ftp stream tcp nowait root /usr/sbin/tcpd /usr/local/sbin/vsftpd
113 (Make sure to remove or comment out any existing ftp service lines. If you
114 don't have tcp_wrappers installed, or don't want to use them, take out the
115 /usr/sbin/tcpd part).
117 inetd will need to be told to reload its config file:
118 kill -SIGHUP `pidof inetd`
120 5b) If using "xinetd", you can follow a provided example, by looking at the
121 file EXAMPLE/INTERNET_SITE/README. Various other examples show how to leverage
122 the more powerful xinetd features.
125 Step 6) Set up PAM for local logins (optional)
127 If you are running vsftpd on a PAM enabled machine, you will need to have a
128 /etc/pam.d/ftp file present, otherwise non-anonymous logins will fail. [NOTE -
129 if you have an older version of PAM, that file might be /etc/pam.conf]
131 For a standard setup, you can just copy a provided example file:
132 cp RedHat/vsftpd.pam /etc/pam.d/ftp
135 Step 7) Customize your configuration
137 As well as the above three pre-requisites, you are recommended to install a
138 config file. The default location for the config file is /etc/vsftpd.conf.
139 There is a sample vsftpd.conf in the distribution tarball. You probably want
140 to copy that to /etc/vsftpd.conf as a basis for modification, i.e.:
142 cp vsftpd.conf /etc
144 The default configuration allows neither local user logins nor anonymous
145 uploads. You may wish to change these defaults.
147 Other notes
148 ===========
150 Tested platforms (well, it builds)
151 - Any modern, well featured platform should work fine! Recent versions of
152 the platforms listed below, and often older ones, should work fine.
153 - Fedora Core
154 - RedHat Linux
155 - RedHat Enterprise Linux
156 - Solaris / GNU tools (Solaris 8 or newer)
157 - SuSE Linux
158 - Debian Linux
159 - OpenBSD
160 - FreeBSD
161 - NetBSD
162 - HP-UX / GNU tools
163 - IRIX / GNU tools
164 - AIX / GNU tools
165 - Mac OS X (note; older versions have setgroups() problem. 10.3.4 reported OK)