- all conf files moved to /etc/vsftpd/ - added documentation and migration

script
This commit is contained in:
Radek Vokál 2004-11-11 10:41:35 +00:00
parent 4ce2b95270
commit 8e4ee765d3
3 changed files with 184 additions and 4 deletions

160
vsftpd-2.0.1-dir.patch Normal file
View File

@ -0,0 +1,160 @@
--- vsftpd-2.0.1/README.dir 2004-07-02 02:34:35.000000000 +0200
+++ vsftpd-2.0.1/README 2004-11-11 12:33:02.114458576 +0100
@@ -35,3 +35,8 @@
Various example configurations are discussed in the EXAMPLE directory.
Frequently asked questions are tackled in the FAQ file.
+Important Note
+==============
+The location of configuration files was changed to /etc/vsftpd/. If you want
+to migrate your old conf files from /etc (files vsftpd.xxxx.rpmsave) use
+/etc/vsfptd/vsftpd_conf_migrate.sh
--- vsftpd-2.0.1/EXAMPLE/INTERNET_SITE_NOINETD/README.dir 2002-11-09 17:07:09.000000000 +0100
+++ vsftpd-2.0.1/EXAMPLE/INTERNET_SITE_NOINETD/README 2004-11-11 12:26:59.331609952 +0100
@@ -17,7 +17,7 @@
To use this example config:
-1) Copy the vsftpd.conf file in this directory to /etc/vsftpd.conf.
+1) Copy the vsftpd.conf file in this directory to /etc/vsftpd/vsftpd.conf.
2) Start up vsftpd, e.g.
vsftpd &
@@ -51,5 +51,5 @@
listen_address=192.168.1.2
And launch vsftpd with a specific config file like this:
-vsftpd /etc/vsftpd.conf.site1 &
+vsftpd /etc/vsftpd/vsftpd.conf.site1 &
--- vsftpd-2.0.1/EXAMPLE/INTERNET_SITE/vsftpd.xinetd.dir 2002-07-31 00:57:21.000000000 +0200
+++ vsftpd-2.0.1/EXAMPLE/INTERNET_SITE/vsftpd.xinetd 2004-11-11 12:26:59.331609952 +0100
@@ -9,7 +9,7 @@
per_source = 5
instances = 200
no_access = 192.168.1.3
- banner_fail = /etc/vsftpd.busy_banner
+ banner_fail = /etc/vsftpd/busy_banner
log_on_success += PID HOST DURATION
log_on_failure += HOST
}
--- vsftpd-2.0.1/EXAMPLE/VIRTUAL_USERS/vsftpd.pam.dir 2002-07-30 20:36:38.000000000 +0200
+++ vsftpd-2.0.1/EXAMPLE/VIRTUAL_USERS/vsftpd.pam 2004-11-11 12:26:59.377602960 +0100
@@ -1,2 +1,2 @@
-auth required /lib/security/pam_userdb.so db=/etc/vsftpd_login
-account required /lib/security/pam_userdb.so db=/etc/vsftpd_login
+auth required /lib/security/pam_userdb.so db=/etc/vsftpd/login
+account required /lib/security/pam_userdb.so db=/etc/vsftpd/login
--- vsftpd-2.0.1/EXAMPLE/VIRTUAL_USERS/README.dir 2003-11-05 01:27:48.000000000 +0100
+++ vsftpd-2.0.1/EXAMPLE/VIRTUAL_USERS/README 2004-11-11 12:26:59.377602960 +0100
@@ -15,7 +15,7 @@
"fred" with password "bar".
Whilst logged in as root, create the actual database file like this:
-db_load -T -t hash -f logins.txt /etc/vsftpd_login.db
+db_load -T -t hash -f logins.txt /etc/vsftpd/login.db
(Requires the Berkeley db program installed).
NOTE: Many systems have multiple versions of "db" installed, so you may
need to use e.g. db3_load for correct operation. This is known to affect
@@ -23,10 +23,10 @@
database to be a specific db version (often db3, whereas db4 may be installed
on your system).
-This will create /etc/vsftpd_login.db. Obviously, you may want to make sure
+This will create /etc/vsftpd/login.db. Obviously, you may want to make sure
the permissions are restricted:
-chmod 600 /etc/vsftpd_login.db
+chmod 600 /etc/vsftpd/login.db
For more information on maintaing your login database, look around for
documentation on "Berkeley DB", e.g.
@@ -37,8 +37,8 @@
See the example file vsftpd.pam. It contains two lines:
-auth required /lib/security/pam_userdb.so db=/etc/vsftpd_login
-account required /lib/security/pam_userdb.so db=/etc/vsftpd_login
+auth required /lib/security/pam_userdb.so db=/etc/vsftpd/login
+account required /lib/security/pam_userdb.so db=/etc/vsftpd/login
This tells PAM to authenticate users using our new database. Copy this PAM
file to the PAM directory - typically /etc/pam.d/
@@ -105,9 +105,9 @@
These put a port range on passive FTP incoming requests - very useful if
you are configuring a firewall.
-Copy the example vsftpd.conf file to /etc:
+Copy the example vsftpd.conf file to /etc/vsftpd:
-cp vsftpd.conf /etc/
+cp vsftpd.conf /etc/vsftpd/
Step 5) Start up vsftpd.
--- vsftpd-2.0.1/EXAMPLE/PER_IP_CONFIG/README.dir 2002-11-09 17:16:12.000000000 +0100
+++ vsftpd-2.0.1/EXAMPLE/PER_IP_CONFIG/README 2004-11-11 12:26:59.377602960 +0100
@@ -20,7 +20,7 @@
Let's have a look at the example:
-vsftpd: 192.168.1.3: setenv VSFTPD_LOAD_CONF /etc/vsftpd_tcp_wrap.conf
+vsftpd: 192.168.1.3: setenv VSFTPD_LOAD_CONF /etc/vsftpd/tcp_wrap.conf
vsftpd: 192.168.1.4: DENY
The first line:
--- vsftpd-2.0.1/EXAMPLE/PER_IP_CONFIG/hosts.allow.dir 2002-11-09 17:04:24.000000000 +0100
+++ vsftpd-2.0.1/EXAMPLE/PER_IP_CONFIG/hosts.allow 2004-11-11 12:26:59.378602808 +0100
@@ -4,6 +4,6 @@
# by the '/usr/sbin/tcpd' server.
#
-vsftpd: 192.168.1.3: setenv VSFTPD_LOAD_CONF /etc/vsftpd_tcp_wrap.conf
+vsftpd: 192.168.1.3: setenv VSFTPD_LOAD_CONF /etc/vsftpd/tcp_wrap.conf
vsftpd: 192.168.1.4: DENY
--- vsftpd-2.0.1/tunables.c.dir 2004-07-02 13:26:17.000000000 +0200
+++ vsftpd-2.0.1/tunables.c 2004-11-11 12:26:59.378602808 +0100
@@ -95,11 +95,11 @@
const char* tunable_message_file = ".message";
const char* tunable_nopriv_user = "nobody";
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;
@@ -111,7 +111,7 @@
const char* tunable_hide_file = 0;
const char* tunable_deny_file = 0;
const char* tunable_user_sub_token = 0;
-const char* tunable_email_password_file = "/etc/vsftpd.email_passwords";
+const char* tunable_email_password_file = "/etc/vsftpd/email_passwords";
const char* tunable_rsa_cert_file = "/usr/share/ssl/certs/vsftpd.pem";
const char* tunable_dsa_cert_file = 0;
const char* tunable_ssl_ciphers = "DES-CBC3-SHA";
--- vsftpd-2.0.1/vsftpd.conf.dir 2004-11-11 12:26:59.231625152 +0100
+++ vsftpd-2.0.1/vsftpd.conf 2004-11-11 12:26:59.380602504 +0100
@@ -88,14 +88,14 @@
# 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
#
# 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

View File

@ -3,7 +3,7 @@
Summary: vsftpd - Very Secure Ftp Daemon
Name: vsftpd
Version: 2.0.1
Release: 5
Release: 6
License: GPL
Group: System Environment/Daemons
URL: http://vsftpd.beasts.org/
@ -13,6 +13,7 @@ Source2: vsftpd.pam
Source3: vsftpd.ftpusers
Source4: vsftpd.user_list
Source5: vsftpd.init
Source6: vsftpd_conf_migrate.sh
Patch1: vsftpd-1.1.3-rh.patch
Patch2: vsftpd-1.0.1-missingok.patch
Patch3: vsftpd-2.0.1-tcp_wrappers.patch
@ -21,6 +22,7 @@ Patch5: vsftpd-2.0.1-signal.patch
Patch6: vsftpd-1.2.1-conffile.patch
Patch7: vsftpd-2.0.1-build_ssl.patch
Patch8: vsftpd-2.0.1-server_args.patch
Patch9: vsftpd-2.0.1-dir.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
%if %{tcp_wrappers}
BuildPrereq: tcp_wrappers
@ -55,6 +57,7 @@ cp %{SOURCE1} .
%patch6 -p1
%patch7 -p1 -b .build_ssl
%patch8 -p1 -b .server_args
%patch9 -p1 -b .dir
%build
%ifarch s390x
@ -77,9 +80,10 @@ install -m 644 vsftpd.conf.5 $RPM_BUILD_ROOT/%{_mandir}/man5/
install -m 644 vsftpd.8 $RPM_BUILD_ROOT/%{_mandir}/man8/
install -m 644 RedHat/vsftpd.log $RPM_BUILD_ROOT/etc/logrotate.d/vsftpd.log
install -m 644 %{SOURCE2} $RPM_BUILD_ROOT/etc/pam.d/vsftpd
install -m 600 %{SOURCE3} $RPM_BUILD_ROOT/etc/vsftpd.ftpusers
install -m 600 %{SOURCE4} $RPM_BUILD_ROOT/etc/vsftpd.user_list
install -m 600 %{SOURCE3} $RPM_BUILD_ROOT/etc/vsftpd/ftpusers
install -m 600 %{SOURCE4} $RPM_BUILD_ROOT/etc/vsftpd/user_list
install -m 755 %{SOURCE5} $RPM_BUILD_ROOT/etc/rc.d/init.d/vsftpd
install -m 744 %{SOURCE6} $RPM_BUILD_ROOT/etc/vsftpd/vsftpd_conf_migrate.sh
mkdir -p $RPM_BUILD_ROOT/var/ftp/pub
@ -101,7 +105,7 @@ fi
%defattr(-,root,root)
/usr/sbin/vsftpd
/etc/rc.d/init.d/vsftpd
%config(noreplace) /etc/vsftpd.*
#%config(noreplace) /etc/vsftpd.*
%dir /etc/vsftpd
%config(noreplace) /etc/vsftpd/*
%config(noreplace) /etc/pam.d/vsftpd
@ -112,6 +116,10 @@ fi
/var/ftp
%changelog
* Mon Nov 11 2004 Radek Vokal <rvokal@redhat.com> 2.0.1-6
- vsftpd. files moved to /etc/vsftpd
- added vsftpd_conf_migrate.sh script for moving conf files
* Fri Oct 01 2004 Radek Vokal <rvokal@redhat.com> 2.0.1-5
- vsftpd under xinetd reads its config file (#134314)

12
vsftpd_conf_migrate.sh Executable file
View File

@ -0,0 +1,12 @@
#!/bin/bash
#move old config files and symlink them
#shipped with vsftpd-2.0.1-6
PREFIX="vsftpd"
for file in $( ls /etc/${PREFIX}.* ); do
if [ ! -L $file ]; then
new=`echo $file | sed s/${PREFIX}\./${PREFIX}\\\\//g | sed s/\.rpmsave//g`
mv -f ${file} ${new}
ln -s ${new} ${file}
echo $file moved to $new
fi
done