Wednesday, July 12, 2006

Server Building, Part 3 (FTP servers, commands)

Onto the software... there are a variety of FTP deamons to choose from, but these two seem to be the most highly regarded ones:
I chose vsftpd because I saw several message board threads which claimed that it was very easy to configure and incredibly secure.

Some other general FTP sites, for those interested:
I installed vsftpd with a simple "sudo apt-get install vsftpd" (thanks again, Ubuntu!). Two of the major issues one faces when setting up an FTP deamon (which basically allows certain people access to the server's file system depending on who they are and what the admin wants them to see) are what local users (users that have an account on the computer) can do and what anonymous users (strangers) can do. Variables in the etc/vsftpd.conf file that have "local" or "anonymous" or "anon" in them pretain to these issues. Use the command "man vsftpd.conf" to find out more about what commands you can put in the conf file. If you are configuring vsftpd, the faq page, in addition to the manpage, will be your best friend:

Here are some helpful admin commands to help set up the FTP server:
  • ifconfig display helpful TCP/IP information (including your IP address)
  • ping confirm a remote host is online and responding; I usually use "ping -c 4" to see if I'm connected on a certain computer
  • netstat info about network connections, routing tables, interface stats, masquerade connections and multicast memberships
  • host a DNS lookup utility
  • ip show/manipulate routing, devices, policy routing and tunnels
  • dig another DNS lookup utility
Here are some commands to query an ftp server:
  • ftp start the ftp prompt
  • bye close the ftp prompt
  • open open a connection with a remote host
  • close close the connection
  • get download a file from the server
  • put store a file on the server
  • Other commands to navigate on the server are similar to those that you use to move aroud regularly: ls, pwd, etc.
  • To do something on your local machine from the ftp prompt, prefix the command with an exclamation mark !
UPDATE: Some more helpful stuff, found via Ubuntu Linux Bible.
  • ? display all the commands the FTP server supports
  • bin enable binary mode, for transferring all binary files... most times this will get done automatically, but you don't want to have your music files corrupted when you transfer them in ASCII mode, do you?
  • hash print a hash (#) for every kilobyte transferred... good if you want to know if the server is transferring data or just hanging when there's no output
The good news is that the server is working. The bad news is that it is not accessible behind my building's firewall. I went to see the basement where all the wires go, but I don't think people would be to happy if I started unplugging stuff to test how the system worked. I'll ask the admin for more details when he gets off his vacation...

No comments: