Bug 76587 - changes to system-auth pam config not processed by vsftpd
changes to system-auth pam config not processed by vsftpd
Product: Red Hat Linux
Classification: Retired
Component: vsftpd (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Radek Vokal
Mike McLean
: 85613 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2002-10-23 14:56 EDT by Jason Corley
Modified: 2007-04-18 12:47 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-08-23 03:58:47 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jason Corley 2002-10-23 14:56:34 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003

Description of problem:
If I add the following to /etc/pam.d/system-auth:
session required /lib/security/pam_mkhomedir.so
Services such as ssh (and all subsets like sftp and scp) and login, etc. will
create the home directory of a user when they first log in.  However vsftpd does
not create the home directory ever and displays the following error when a user
tries to log in who doesn't have a home directory:
Unexpected response: OOPS: chdir
OOPS: chdir
OOPS: child died

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Add "session required /lib/security/pam_mkhomedir.so" to /etc/pam.d/system-auth
2. Attempt to log in as a valid user without a home directory
3. View error

Expected Results:  vsftpd should process the pam_mkhomedir module and create a
home directory if one doesn't exist.

Additional info:
Comment 1 Bill Nottingham 2002-12-13 19:29:48 EST
This *may* be fixed with 1.1.3-1, FWIW.
Comment 2 Jason Corley 2002-12-16 10:44:12 EST
No, sadly it doesn't fix the pam problem.  I rebuilt the srpm from rawhide,
version 1.1.3-2.  I found two errors in the 1.1.3-2 spec and the init script. 
The first is that /etc/rc.d/init.d/vsftpd is mode 644.  The second is a missing
bracket calling an array in the init script.  Here are patches to fix both in
case you haven't already done so:

--- vsftpd.init Fri Dec 13 19:28:27 2002
+++ vsftpd.init.new     Mon Dec 16 10:43:55 2002
@@ -34,7 +34,7 @@

                 while [ "${index}" -lt "${site_count}" ] ; do
-                        site=`basename $sites[${index}]} .conf`
+                        site=`basename ${sites[${index}]} .conf`
                         echo -n $"Starting $prog for $site: "
                                 ( /usr/sbin/vsftpd ${sites[${index}]} &)
                                 daemon true

--- vsftpd.spec Fri Dec 13 19:41:14 2002
+++ vsftpd.spec.new     Mon Dec 16 10:17:28 2002
@@ -46,7 +46,7 @@
 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 644 %{SOURCE5} $RPM_BUILD_ROOT/etc/init.d/vsftpd
+install -m 755 %{SOURCE5} $RPM_BUILD_ROOT/etc/init.d/vsftpd

 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
Comment 3 Jason Corley 2002-12-16 10:50:46 EST
Since the init script looks for *.conf in /etc/vsftpd, would there be any reason
to not move vsftpd.user_list and vsftpd.ftpusers into /etc/vsftpd?  Just seems
more System V-ish IMHO.
Comment 4 Jason Corley 2002-12-16 11:03:13 EST
Since I was adding patches to this anyway, here's one to put all the config
files into /etc/vsftpd (also includes the mode fix for /etc/rc.d/init.d/vsftpd).

--- vsftpd.spec Fri Dec 13 19:41:14 2002
+++ vsftpd.spec.new     Mon Dec 16 11:03:59 2002
@@ -44,9 +44,9 @@
 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 644 %{SOURCE5} $RPM_BUILD_ROOT/etc/init.d/vsftpd
+install -m 600 %{SOURCE3} $RPM_BUILD_ROOT/etc/vsftpd/vsftpd.ftpusers
+install -m 600 %{SOURCE4} $RPM_BUILD_ROOT/etc/vsftpd/vsftpd.user_list
+install -m 755 %{SOURCE5} $RPM_BUILD_ROOT/etc/init.d/vsftpd

 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
@@ -65,7 +65,6 @@
-%config(noreplace) /etc/vsftpd.*
 %dir /etc/vsftpd
 %config(noreplace) /etc/vsftpd/*
 %config(noreplace) /etc/pam.d/vsftpd
Comment 5 Bill Nottingham 2003-08-08 00:43:42 EDT
Initial issues are fixed now.
Comment 6 Bill Nottingham 2003-08-08 00:44:02 EDT
*** Bug 85613 has been marked as a duplicate of this bug. ***
Comment 7 Radek Vokal 2004-08-23 03:58:47 EDT
Should be fixed with vsftpd-2.0.1

Note You need to log in before you can comment on or make changes to this bug.