- Edit /etc/shells and add the following line
/etc/ftponly
- If you don't have the anonymous FTP package installed, do so as it will save you some time in creating the directory structure for your ftp users.
You can download or view this admin script Here that will assist in creating the necessary directory structure and files for chrooted ftp.
- You will need to upload that ftp script in ascii format if you are uploading from a microsoft based machine.
- You will need to set chmod 755 on the ftp script
- The script designates perl in /usr/local/bin/perl if your perl is in /usr/bin/perl you will need to modify the first line of the script accordingly.
- This script assumes your users directories (including anonymous ftp) are in /home directory
- For each new user you wish to create simply
- Create the user using useradd, userconf, or what ever process you like the best
- Run the ftp program, (contents of ftp.txt), and answer the questions
- The ftp program will copy the files necessary for the user to be able to operate in a chrooted environment and edit the /etc/passwd file so they are chrooted
- NOTE * This program must be run as root for all the functions to operate properly
- Your new user now has ftp access and is chrooted to their home directory when they log in
All of this information was compiled based on the Howto by Michael Brennen which can be viewed Here |