Wednesday, June 10, 2009

Set up an FTP Server on Ubuntu

Installation

1. sudo apt-get install proftpd gproftpd. This will install all the necessary config files for proftp along with the GUI (gui being gproftpd)

2. Once install check to see if the server is running by using pgrep proftpd. If you do not see a PID than start it by typing /etc/init.d/proftpd start or status to see if again,  the process is running.

Configuring Server

1. Once installed proftp will be under a new category of programs called system tools. Go to system tool -> GA-ADMIN PROFTP

2. There are several tabs that gui provides in editing your FTP settings: they are server, users, transfers, discs, files, secuirty, and configuration

Server- name your server to your liking. Use your private IP address in the address field. Issuing an ifconfig at the cmd line will bring you your private IP.By default the server is set to an idle time of 120 seconds so adjust time if you wish to.

Users- this is where you will create all users that are allowed to your ftp site. You can create user accounts with anonymous access by un-checking the required password box. The users section is where you will designate directories/drives for remote users to access as well.

Transfers- Will show you files that where transfered between remote pc and server

Discs- Displays directories that are available to share along with how much space is currently available in those directories

Files-  shows statistics about what was downloaded by the user

Security- Gives a log file view of who was last logged  on the ftp server.

Configuration- If for whatever reason that your settings that you edited do not adjust you can change them here. Its easier to read by editing it here than terminal its a little cleaner and easier to see where and what you are editing

Home Router settings

Next, we are going to have to open up some ports on your router. Most newer routers they use port forwarding and with the older ones like my d-link router we create a new virtual server.

1. In your web browser go to the you gateway address which would be something like 192.168.0.1 or verify it by using ifconfig

2. The port that you want to open is port 21 or if you feel you will be vulnerable to attacks use 2121 or something along those lines

3. For the IP address of your sever it will be your private IP address

4. Save settings

Connecting to ftp server

1. Using a client such as filezilla which is free of charge or if you are an  intermediate-advance user use the command line. This is how we are going to connect to the ftp server

2. Find out Your public IP address using IPchicken.com. Once there it will display your public IP

3. You will use the public IP address to access you site along with a username, password, and port number. If everything is setup correctly you will be able to upload and download files. If you cannot go back and check that your settings are correct along with you private and public ip addresses



8 comments:

Tim said...

Thanks so much! This helped me out a lot. Im new to the linux world (being a PC tech for 8 years) thats sad to say lol. This article was exactly what I was looking for. Thanks!

Bucknasty said...

You're welcome Tim.

Anonymous said...

Your article is simple and strait forward. Thank you it was very helpful. Fred

Bucknasty said...

Glad you found it useful Fred.

markinsonmarshal said...

Great lot of information is been shared in this post.I just enjoyed being the part of such an informative post.
configuration management

Home Audio For Beginners said...

nice article, this is what i've been searching for.thanks

Bucknasty said...

I'm very happy some passer's bye have found useful information in the post. When I first started ubuntu-ing one of the first things I needed was an FTP server.

chris said...

Hi, Im not sure if this would help you or not but I have written a guide about how you can do this with pureftp on ubuntu server 12.04. You can set up different accounts which you can manage through mysql. As i said, im not sure if this is you wanted but I hope it helps

http://wilson18.com/how-to/linux-networking/how-to-add-ftp-accounts-for-your-hosted-sites/