Click to See Complete Forum and Search --> : chroot/wu-ftp problems


davedude
11-20-2003, 09:45 PM
I am having problems getting chroot to work properly with a user (homer). He can ftp in and defaults to / (root directory of system) not his home directory and he can move about all the system directories instead of being contained to just his home directory.

RedHat 9.0
wu-ftp 2.6.2

user is homer, uid=501
group is ftponly, gid=101
user's home directory is = /pub/homer/public_files

i added homer using the adduser command.

the /etc/passwd file looks like this:

homer:x:501:101:homer:/pub/homer/ ./public_files/:/sbin/nologin

/sbin/nologin is in the /etc/shells directory.

I added the following to the /etc/group file:

ftponly:x:101:

I added the following to the /etc/ftpaccess file:

guestgroup ftponly

I then gave the commands:

# chown -R root /pub/homer
# cd /pub/homer
# chown homer public_files
# chgrp ftponly public_files


Now the only way I can even get homer to default to his home directory when he logs in is to change the /etc/passwd file to reflect this:

homer:x:501:101:homer:/pub/homer/public_files/:/sbin/nologin

in effect removing the chroot ./ pointer.


Any ideas would be greatly appreciated!

dave