Bug 98640

Summary: non-anon ftp install can't get hdlist if user home is the same as the directory containing RedHat
Product: [Retired] Red Hat Linux Reporter: Greg <redfedora001>
Component: anacondaAssignee: Michael Fulbright <msf>
Status: CLOSED RAWHIDE QA Contact: Mike McLean <mikem>
Severity: low Docs Contact:
Priority: low    
Version: 9   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-07-09 05:22:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Greg 2003-07-06 14:02:51 UTC
Description of problem:
I wanted to play with ftp installs so I set up an RH9 ftp server with the 
RedHat directory in /var/www/html (I am also playing with http installs).  I 
then set up a user with that directory as its home. /etc/passwd entry: 
install:x:501:501::/var/www/html:/bin/bash

I turned off the firewall and enabled ftp and confirmed that I could ftp to 
the account and retrieve files from the system that I was going to reinstall. 
(note that the user was NOT set up to chroot to the home directory)  I booted 
a boot floppy, chose linux text and an ftp install, loaded the driver disk and 
entered the following ftp information:
server: 192.168.1.100
directory: /var/www/html
non-anonymous ftp: user - install password - install
the installer was able to successfully retrieve netstg2.img, but later 
(when "Reading Package Information") fails when trying to retrieve hdlist with:
IOError ftp error occurred getting ftp://install:%69%6e%73%74%61%6c%
6c.1.100/var/wwww/html/RedHat/base/hdlist: 550 Failed to change 
directory.

Using ethereal I was able to determine that the netstg2.img file was being 
retrieved using one method (an absolute URL built from the directory 
entered).  The ftp requests were:
USER install
PASS install
TYPE I
PASV
RETR /var/www/html/RedHat/base/netstg2.img
but that when hdlist was being retrieved the program tries to first step 
through directories using relative commands which fail because the user's home 
diretory is within the path that was specified and not at the root of that 
path (i.e. when install logs in, the current directory is /var/www/html).  The 
ftp requests in this case were:
USER install
PASS install
CWD var
The CWD fails with 550 because there is no /var/www/html/var directory.  

If I change installs home directory to be the root dir (/) then everything 
works fine.  I assume that if I set up a chrooted environment with the root as 
the user's home that it would work properly as well.  This may just be a 
restriction which should be documented.


Version-Release number of selected component (if applicable):
RH9 Retail CD / boot disk images

How reproducible:
Every Time

Steps to Reproduce:
1. set up an ftp server with RedHat in /var/www/html/RedHat
2. Set up a user with /var/www/html as its home
3. Set up ftp to allow that user to log in
4. boot install disk on client - only tested in "linux text" mode
5. Perform an ftp install using a non-anonymous user (the one in step 2)
6. Watch it fail when it attempts to read packages

    
Actual results:
Install fails out - unable to read hdlist for package information

Expected results:
Install should have completed normally.

Additional info:

Comment 1 Jeremy Katz 2003-07-09 05:22:00 UTC
Fixed in CVS, update disk at http://people.redhat.com/~katzj/9-updates.img
should have the fix.