Wednesday, January 17, 2007

Install FTP Server

It's been awhile since I've done anything (don't ask), but today I'm going to install the ftp server.
I've got two reasons for this:
1. FTP is a cool little internet protocol that nobody really thinks about much anymore,
2. it will require me to think about security, port forwarding, and connectivity early, and
3. it will make things easier when I'm designing the site, or if i want to make changes at work, etc

First, since it's been a week, I'm going to manually check for any updates using synaptic:
System - administration - synaptic
hit reload and then mark all upgrades (this goes and checks the repositories for newer versions of the programs you already have)
When you hit apply twice, you will download and install all available upgrades.

To install proftpd, just search for it and mark it for installation. A warning will pop up telling you to install a few other programs, just go ahead and install them too. Proftpd will not work without them.
We are also going to install gproftpd while we are at it so we can use it to configure proftpd.
After you start to install these two programs, a dialog will come up and ask if you want to run proftpd as standalone or inetd. Standalone means just what it says, but inetd is something very interesting:
inetd means InterNET Daemon, and what it does is listen for requests for each program, and start them only when they are needed. Otherwise, if you have a computer running the apache webserver, proftpd, and SSH, all three programs (and others) would all be running at the same time. inetd runs by itself and just calls the others when they are needed.

Before we get started adding users and groups, lets decide where we want to store our ftp files.
Lets make a new folder under /home
cd /home
sudo mkdir FTP-shared
CD stands for Change Directory
SUDO gets us temporary privledges beyod what we normally have as a regular user
MKDIR stands for MaKe DIRectory

First, we need to set up a new user:
lets go to system - administration - users and groups

Second, lets add a group called ftpgroup by going to manage groups and adding it

third, lets hit add user.
In the new window, we have some options let's use these for the sake of argument:
Username: idiot
real name: idiot
type in a password for idiot and then again to confirm
under the user privledges tab, make sure nothing is checked
under the advanced tab, make sure the home directory is /home/ftp-shared
lets set the shell to something non-existent like /bin/false, and
lets set the main group to ftpgroup

Labels:

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home