as Dave sugested, Proftpd can do that very easily. It handles chroot'ed dirs thing much better. Check it out at www.proftpd.org.
Reading your message, I noticed that you have indicated the "/bin/ftponly" as the user's shell. This shouldn't be a directory, but a shell.
FTP conections requires a valid shell. A
valid shell is any program listed in the /etc/shells file.
If you don't want to put a *real* shell (to not
allow telnet connections), you can use "/bin/true" as the user's shell.
/bin/true is a problem that doesn't do anything. Make sure you add
"/bin/true" in your /etc/shells file.
Also, if you use "/ftp/./user1" as the user's HOME dir, this means that:
- User's home will be /ftp (wu-ftpd does a "chroot")
- Then wu-ftpd changes the directory to /ftp/user1
(he does a simple "cd user1")
wu-ftpd expects to find a "/bin/ls" file. So you need to have /ftp/bin/ls in there. Simply copying your /bin/ls to /ftp/bin/ls won't do much thing, because your ls uses shared libraries located at /lib (and wu-ftpd expects to find them at "/ftp/lib". (you can check which libraries are needed with "ldd /bin/ls").
Perhaps you wanna copy the already existing structure in /home/ftp/* (this is installed in RH systems when you select "Anonymous FTP" during instalation).
Hope I helped a little.
Good luck,
Henrique Pantarotto
Sao Paulo, SP - Brazil
TechR wrote:
I have just installed WU-FTPD on RedHat 5.2. According to the book Linux Unleased (Third Edition), pp. 198-199, if I added a user to a group and add a "guestgroup" line in my FTPACCESS file naming that group, and added this line in the passwd file: user1:encrypted password:500:1228:User1:/ftp/./user1:/bin/ftponly that user should be able to get anywhere but the ftp and dir.Unfortunately when I do that, RH wants to create the directory /bin/ftponly, or it doesn't work, or I can get in without the dir limitations in passwd file, but I can't get anywhere. My objective is to limit the user to their home directory. Can somebody shed some light on this or point me to the right direction. Thanks.
