head 1.3; access; symbols VSFTPD_1_1_3:1.2; locks; strict; comment @# @; 1.3 date 2003.06.15.15.44.01; author swiergot; state dead; branches; next 1.2; 1.2 date 2003.01.03.19.08.06; author swiergot; state Exp; branches; next 1.1; 1.1 date 2002.12.25.23.28.34; author swiergot; state Exp; branches; next ; desc @@ 1.3 log @- Version 1.2.0. - Splitted misc patch into five new patches. - Reviewed docs_source. - Preserving old configuration files. - Don't enable local users logins by default. - Extended configuration file. @ text @diff -ru vsftpd-1.1.3.orig/defs.h vsftpd-1.1.3/defs.h --- vsftpd-1.1.3.orig/defs.h 2002-07-10 00:51:57.000000000 +0200 +++ vsftpd-1.1.3/defs.h 2002-11-29 19:52:11.000000000 +0100 @@@@ -1,7 +1,7 @@@@ #ifndef VSF_DEFS_H #define VSF_DEFS_H -#define VSFTP_DEFAULT_CONFIG "/etc/vsftpd.conf" +#define VSFTP_DEFAULT_CONFIG "/etc/vsftpd/vsftpd.conf" #define VSFTP_COMMAND_FD 0 diff -ru vsftpd-1.1.3.orig/FAQ vsftpd-1.1.3/FAQ --- vsftpd-1.1.3.orig/FAQ 2002-10-08 00:26:36.000000000 +0200 +++ vsftpd-1.1.3/FAQ 2002-11-29 19:52:11.000000000 +0100 @@@@ -28,7 +28,8 @@@@ Q) Help! Local users cannot log in. A) There are various possible problems. A1) By default, vsftpd disables any logins other than anonymous logins. Put -local_enable=YES in your /etc/vsftpd.conf to allow local users to log in. +local_enable=YES in your /etc/vsftpd/vsftpd.conf to allow local users to log +in. A2) vsftpd tries to link with PAM. (Run "ldd vsftpd" and look for libpam to find out whether this has happened or not). If vsftpd links with PAM, then you will need to have a PAM file installed for the vsftpd service. There is @@@@ -40,12 +41,12 @@@@ A4) If you are not using PAM, then vsftpd will do its own check for a valid user shell in /etc/shells. You may need to disable this if you use an invalid shell to disable logins other than FTP logins. Put check_shell=NO in your -/etc/vsftpd.conf. +/etc/vsftpd/vsftpd.conf. Q) Help! Uploads or other write commands give me "500 Unknown command.". A) By default, write commands, including uploads and new directories, are disabled. This is a security measure. To enable writes, put write_enable=YES -in your /etc/vsftpd.conf. +in your /etc/vsftpd/vsftpd.conf. Q) Help! What are the security implications referred to in the "chroot_local_user" option? @@@@ -79,11 +80,11 @@@@ mode. Use "listen_address=x.x.x.x" to set the virtual IP. Q) Help! Does vsftpd support virtual users? -A) Yes, via PAM integration. Set "guest_enable=YES" in /etc/vsftpd.conf. This -has the effect of mapping every non-anonymous successful login to the local -username specified in "guest_username". Then, use PAM and (e.g.) its pam_userdb -module to provide authentication against an external (i.e. non-/etc/passwd) -repository of users. +A) Yes, via PAM integration. Set "guest_enable=YES" in /etc/vsftpd/vsftpd.conf. +This has the effect of mapping every non-anonymous successful login to the +local username specified in "guest_username". Then, use PAM and (e.g.) its +pam_userdb module to provide authentication against an external +(i.e. non-/etc/passwd) repository of users. Note - currently there is a restriction that with guest_enable enabled, local users also get mapped to guest_username. There is an example of virtual users setup in the "EXAMPLE" directory. diff -ru vsftpd-1.1.3.orig/INSTALL vsftpd-1.1.3/INSTALL --- vsftpd-1.1.3.orig/INSTALL 2002-11-09 16:45:02.000000000 +0100 +++ vsftpd-1.1.3/INSTALL 2002-11-29 19:52:11.000000000 +0100 @@@@ -21,17 +21,17 @@@@ -rwxrwxr-x 1 chris chris 61748 Sep 27 00:26 vsftpd Step 2) Satisfy vsftpd pre-requisites -2a) vsftpd needs the user "nobody" in the default configuration. Add this +2a) vsftpd needs the user "vsftpd" in the default configuration. Add this user in case it does not already exist. e.g.: -[root@@localhost root]# useradd nobody -useradd: user nobody exists +[root@@localhost root]# useradd vsftpd +useradd: user vsftpd exists -2b) vsftpd needs the (empty) directory /usr/share/empty in the default +2b) vsftpd needs the (empty) directory /var/empty in the default configuration. Add this directory in case it does not already exist. e.g.: -[root@@localhost root]# mkdir /usr/share/empty/ -mkdir: cannot create directory `/usr/share/empty': File exists +[root@@localhost root]# mkdir /var/empty/ +mkdir: cannot create directory `/var/empty': File exists 2c) For anonymous FTP, you will need the user "ftp" to exist, and have a valid home directory (which is NOT owned or writable by the user "ftp"). @@@@ -56,14 +56,15 @@@@ "make install" doesn't copy the sample config file. It is recommended you do this: -cp vsftpd.conf /etc +mkdir /etc/vsftpd +cp vsftpd.conf /etc/vsftpd Step 4) Smoke test (without an inetd). vsftpd can run standalone or via an inetd (such as inetd or xinetd). You will typically get more control running vsftpd from an inetd. But first we will run it without, so we can check things are going well so far. -Edit /etc/vsftpd.conf, and add this line at the bottom: +Edit /etc/vsftpd/vsftpd.conf, and add this line at the bottom: listen=YES @@@@ -133,11 +134,13 @@@@ Step 7) Customize your configuration As well as the above three pre-requisites, you are recommended to install a -config file. The default location for the config file is /etc/vsftpd.conf. -There is a sample vsftpd.conf in the distribution tarball. You probably want -to copy that to /etc/vsftpd.conf as a basis for modification, i.e.: +config file. The default location for the config file is +/etc/vsftpd/vsftpd.conf. There is a sample vsftpd.conf in the distribution +tarball. You probably want to copy that to /etc/vsftpd/vsftpd.conf as a basis +for modification, i.e.: -cp vsftpd.conf /etc +mkdir /etc/vsftpd +cp vsftpd.conf /etc/vsftpd The default configuration allows neither local user logins nor anonymous uploads. You may wish to change these defaults. diff -ru vsftpd-1.1.3.orig/tunables.c vsftpd-1.1.3/tunables.c --- vsftpd-1.1.3.orig/tunables.c 2002-10-25 00:46:21.000000000 +0200 +++ vsftpd-1.1.3/tunables.c 2002-11-29 19:52:11.000000000 +0100 @@@@ -65,19 +65,19 @@@@ unsigned int tunable_file_open_mode = 0666; unsigned int tunable_max_per_ip = 0; -const char* tunable_secure_chroot_dir = "/usr/share/empty"; -const char* tunable_ftp_username = "ftp"; +const char* tunable_secure_chroot_dir = "/var/empty"; +const char* tunable_ftp_username = "vsftpd"; const char* tunable_chown_username = "root"; -const char* tunable_xferlog_file = "/var/log/vsftpd.log"; +const char* tunable_xferlog_file = "/var/log/vsftpd"; const char* tunable_message_file = ".message"; /* XXX -> "secure"? */ -const char* tunable_nopriv_user = "nobody"; +const char* tunable_nopriv_user = "vsftpd"; const char* tunable_ftpd_banner = 0; -const char* tunable_banned_email_file = "/etc/vsftpd.banned_emails"; -const char* tunable_chroot_list_file = "/etc/vsftpd.chroot_list"; +const char* tunable_banned_email_file = "/etc/vsftpd/banned_emails"; +const char* tunable_chroot_list_file = "/etc/vsftpd/chroot_list"; const char* tunable_pam_service_name = "ftp"; const char* tunable_guest_username = "ftp"; -const char* tunable_userlist_file = "/etc/vsftpd.user_list"; +const char* tunable_userlist_file = "/etc/vsftpd/user_list"; const char* tunable_anon_root = 0; const char* tunable_local_root = 0; const char* tunable_banner_file = 0; diff -ru vsftpd-1.1.3.orig/vsftpd.8 vsftpd-1.1.3/vsftpd.8 --- vsftpd-1.1.3.orig/vsftpd.8 2001-03-12 02:14:07.000000000 +0100 +++ vsftpd-1.1.3/vsftpd.8 2002-11-29 19:52:11.000000000 +0100 @@@@ -20,7 +20,7 @@@@ An optional .Op configuration file may be given on the command line. The default configuration file is -.Pa /etc/vsftpd.conf . +.Pa /etc/vsftpd/vsftpd.conf . .Sh SEE ALSO .Xr vsftpd.conf 5 diff -ru vsftpd-1.1.3.orig/vsftpd.conf vsftpd-1.1.3/vsftpd.conf --- vsftpd-1.1.3.orig/vsftpd.conf 2001-07-30 23:51:07.000000000 +0200 +++ vsftpd-1.1.3/vsftpd.conf 2002-11-29 19:58:58.000000000 +0100 @@@@ -1,20 +1,17 @@@@ -# Example config file /etc/vsftpd.conf -# -# The default compiled in settings are very paranoid. This sample file -# loosens things up a bit, to make the ftp daemon more usable. +# The configuration file for vsftpd. # # Allow anonymous FTP? anonymous_enable=YES # # Uncomment this to allow local users to log in. -#local_enable=YES +local_enable=YES # # Uncomment this to enable any form of FTP write command. -#write_enable=YES +write_enable=YES # # Default umask for local users is 077. You may wish to change this to 022, # if your users expect that (022 is used by most other ftpd's) -#local_umask=022 +local_umask=022 # # Uncomment this to allow the anonymous FTP user to upload files. This only # has an effect if the above global write enable is activated. Also, you will @@@@ -43,7 +40,7 @@@@ # # You may override where the log file goes if you like. The default is shown # below. -#xferlog_file=/var/log/vsftpd.log +#xferlog_file=/var/log/vsftpd # # If you want, you can have your log file in standard ftpd xferlog format #xferlog_std_format=YES @@@@ -56,7 +53,7 @@@@ # # It is recommended that you define on your system a unique user which the # ftp server can use as a totally isolated and unprivileged user. -#nopriv_user=ftpsecure +#nopriv_user=vsftpd # # Enable this and the server will recognise asynchronous ABOR requests. Not # recommended for security (the code is non-trivial). Not enabling it, @@@@ -83,18 +80,44 @@@@ # useful for combatting certain DoS attacks. #deny_email_enable=YES # (default follows) -#banned_email_file=/etc/vsftpd.banned_emails +#banned_email_file=/etc/vsftpd/banned_emails +# +# Enable list (/etc/vsftpd/user_list by default) of users who won't be able +# to log in. +userlist_enable=YES +# +# You can change location of file used by userlist_enable option. +#userlist_file=/etc/vsftpd/user_list +# +# Uncomment this option to change behavior of userlist_enable so users listed +# in userlist_file will be able to log in and all other will be denied. +#userlist_deny=NO +# +# Comment out this option if you don't want to chroot local users. +chroot_local_user=YES # # You may specify an explicit list of local users to chroot() to their home # directory. If chroot_local_user is YES, then this list becomes a list of # users to NOT chroot(). #chroot_list_enable=YES # (default follows) -#chroot_list_file=/etc/vsftpd.chroot_list +#chroot_list_file=/etc/vsftpd/chroot_list # # You may activate the "-R" option to the builtin ls. This is disabled by # default to avoid remote users being able to cause excessive I/O on large # sites. However, some broken FTP clients such as "ncftp" and "mirror" assume # the presence of the "-R" option, so there is a strong case for enabling it. #ls_recurse_enable=YES - +# +# This powerful option allows the override of any config option specified in +# the manual page, on a per-user basis. +user_config_dir=/etc/vsftpd/user_conf +# +# If enabled, all user and group information in directory listings will be +# displayed as "ftp". +#hide_ids=YES +# +# If enabled, vsftpd will display directory listings with the time in your +# local time zone. The default is to display GMT. The times returned by the +# MDTM FTP command are also affected by this option. +#use_localtime=YES diff -ru vsftpd-1.1.3.orig/vsftpd.conf.5 vsftpd-1.1.3/vsftpd.conf.5 --- vsftpd-1.1.3.orig/vsftpd.conf.5 2002-11-09 16:41:11.000000000 +0100 +++ vsftpd-1.1.3/vsftpd.conf.5 2002-11-29 19:52:11.000000000 +0100 @@@@ -4,7 +4,7 @@@@ .SH DESCRIPTION vsftpd.conf may be used to control various aspects of vsftpd's behaviour. By default, vsftpd looks for this file at the location -.BR /etc/vsftpd.conf . +.BR /etc/vsftpd/vsftpd.conf . However, you may override this by specifying a command line argument to vsftpd. The command line argument is the pathname of the configuration file for vsftpd. This behaviour is useful because you may wish to use an advanced @@@@ -115,7 +115,7 @@@@ different if chroot_local_user is set to YES. In this case, the list becomes a list of users which are NOT to be placed in a chroot() jail. By default, the file containing this list is -/etc/vsftpd.chroot_list, but you may override this with the +/etc/vsftpd/chroot_list, but you may override this with the .BR chroot_list_file setting. @@@@ -143,7 +143,7 @@@@ .B deny_email_enable If activated, you may provide a list of anonymous password e-mail responses which cause login to be denied. By default, the file containing this list is -/etc/vsftpd.banned_emails, but you may override this with the +/etc/vsftpd/banned_emails, but you may override this with the .BR banned_email_file setting. @@@@ -316,7 +316,7 @@@@ .TP .B xferlog_enable If enabled, a log file will be maintained detailling uploads and downloads. -By default, this file will be placed at /var/log/vsftpd.log, but this location +By default, this file will be placed at /var/log/vsftpd, but this location may be overridden using the configuration setting .BR xferlog_file . @@@@ -448,7 +448,7 @@@@ .BR deny_email_enable is enabled. -Default: /etc/vsftpd.banned_emails +Default: /etc/vsftpd/banned_emails .TP .B banner_file This option is the name of a file containing text to display when someone @@@@ -476,7 +476,7 @@@@ .BR chroot_local_user is disabled. -Default: /etc/vsftpd.chroot_list +Default: /etc/vsftpd/chroot_list .TP .B guest_username See the boolean setting @@@@ -525,7 +525,7 @@@@ than nobody. The user nobody tends to be used for rather a lot of important things on most machines. -Default: nobody +Default: vsftpd .TP .B pam_service_name This string is the name of the PAM service vsftpd will use. @@@@ -543,7 +543,7 @@@@ directory should not be writable by the ftp user. This directory is used as a secure chroot() jail at times vsftpd does not require filesystem access. -Default: /usr/share/empty +Default: /var/empty .TP .B user_config_dir This powerful option allows the override of any config option specified in @@@@ -551,10 +551,10 @@@@ with an example. If you set .BR user_config_dir to be -.BR /etc/vsftpd_user_conf +.BR /etc/vsftpd/user_conf and then log on as the user "chris", then vsftpd will apply the settings in the file -.BR /etc/vsftpd_user_conf/chris +.BR /etc/vsftpd/user_conf/chris for the duration of the session. The format of this file is as detailed in this manual page! @@@@ -565,7 +565,7 @@@@ .BR userlist_enable option is active. -Default: /etc/vsftpd.user_list +Default: /etc/vsftpd/user_list .TP .B xferlog_file This option is the name of the file to which we write the transfer log. The @@@@ -573,7 +573,7 @@@@ .BR xferlog_enable is set. -Default: /var/log/vsftpd.log +Default: /var/log/vsftpd .SH AUTHOR chris@@scary.beasts.org @ 1.2 log @- Fixed uncompleted script.postinst. @ text @@ 1.1 log @- Initial release. - Version 1.1.3. @ text @@ .