Tag Archives: ftp

How to install configure and manage an FTP server

2008 notice: up to date, the most complete and freeware FTP server is FileZilla. I do not have time, will, and resources to re-edit the whole guid to this software, anyway you can follow the same basic principles to setup a server

This is dedicated to all of you who would like to share with others their files, such as MP3’s, Movies, Pictures, FREE Programs, and… well whatever else you think it is a good idea to share .

Since there are many different FTP Server softwares out there, and as happened for FTP clients, some of them are free, I’ll put in here a tutorial on how to start from scratch with a free one (for instance WarFTPDaemon, which is, if not the most userfriendly, at least the most powerful; I’ll put available for download also GuildFTP, which instead is quite nice graphically, plus offers a very flexible interoperability with mIRC). Visit the Dowloads/Internet section of this site to get the installers.

 

Install and run the thing.

Let’s come to the tutorial itself.

This is how appears the server’s console when you start it. We’ll explain what to do step by step.

 

After the server is installed and running, we’ll have to set how many people can login, what port the server will be listening on, blah, blah, blah.

You have right now the chance to change the port the server will listen on, just put another number in place of 21 (the IP near the port can’t be changed, it logs your IP when you’re connected, and is 127.0.0.1 when you are offline). You can use virtually any numer, but avoid to use 23, 25, 80, 110, 139, which may (actually in very rare cases) interfere with your current other running services, and in general, choose with no problem any number from 1024 to about 65000. Then, the max decent number of users, unless you are on a T3, is 2 max for a 56k, even 3 for a 64k ISDN, 5-6 for a 128k ISDN, 8-10 for an aDSL, even a bit more for cable users. But still it’s your choice, the more users will connect at the same time, the slower they’ll go .

Next, you need to set users. One choice is to make an account for each person you want to access the server, asking them what username and password they prefer; or, if you, for example, serve songs in an IRC channel, it is much better to create a single account, with a standard username/password, like channelname/napstersux0rs (hey ’tis just and example ). Then you need to set the folders each user will be able to access, and what rights will have in those folders.

Reach the Edit User dialog by doing [Properties > Security > Edit User…]. You add users by pressing the Add button in the User panel side, then specifying a username (case sensitive), and a password (also case sensitive; you’ll be asked to retype it for security purposes; in this case, the login was ID:John PSW:Smith). Then switch to the File Access panel from the Security one. This is how you should set the (default permissions), that is, everything is disabled by default, you’ll specify for each folder if it is accessible or not.

 

And this is how you should set the parameters for the shared folders. To add a shared folder, press the Add button in the File Access panel side, and a dialog to choose the folders will appear. The Read right is to enable the download of the files. Uncheck the Write Delete Execute rights, to avoid l4m3 users from messing on your HD via FTP. The List (dir) right is to allow the user to see the folders he can access. Disable Create Remove to avoid a user from messing, as I told before. The Root and Home attributes are used to make the user automatically access the selected folder when he logins. If you want a login for each user, just keep adding them from scratch, till you feel you have enough accounts. When it is really all done, press the OK button in the upper right corner.

 

When you setted the user parameters, you need to adjust the overall server options, by doing [Properties > Options]. I won’t paste in here a screenshot for every panel, since you can follow the instructions by reading in here, and also because this page would get simply HUGE to download. So, you have the [Options > General] panel in front of you. I suggest you to enable Go online when started and minimize so the server, will be there ready to act. The rest if left to your will, only remember that selecting Advanced. Please enable all options you’ll find the Edit User panel a but more messy. Just use this option when you’ll become more acquainted with the program .

Switch to the Server Name panel (we can ignore for now all the other panels, which control the advanced options, and are not supposed to interest a first time user). In that panel, put a nice name for your server, like "FrAnKiE’s FrEe FoR AlL FiLeZ SeRvEr", and if you want insert your email, or leave the invalid default one.

This is done! I mean… almost… actually the two great capabilities of WarFTPd are folder mapping, and especially the Virtual File System. Since you can now start sharing your files, you can avoid reading further. But if you want to add more folders located on different disks/partitions (for example one with songs, another with pictures, another with programs and so on, and also a folder to let users upload files to you) it may be VERY useful to activate the disk mapping (I’ll avoid explaining how to use the Virtual File System, both because it should be used only by advanced users, and beacuse… err.. well… I still gotta fully understand how it works … but hey! I had to learn WarFTPd JUST to write down this tutorial!).

 

Now, let’s make an example: you have all your songs on the partition G:\, some pictures in F:\Docz\Images\…\, and want to add an Upload folder in F:\Temp\Uploads\ (well, this is more or less how my disk is organized, I suppose you don’t have so many partitions, but it will make the same, just change the example folders to the real names ).

Now, it would be a nice idea to create an empty folder just for the FTP (which will work actually only as a container for the links to the other, external, folders), let’s say F:\FTP\.

What will you have to do? Add the empty container folder in the File Access panel as I explained before. For this one, set the Read and List (dir) rights, plus the Recursive, Root and Home attributes. Then simply keep adding the other folders you want to share, selecting Read, List (dir), Recursive and Mapping.

When you select Mapping, the Alias dialog will appear, letting you specify the name which the folder will get when added to the Root of the Server. The G:\ folder will keep its current position, only there will be a link, named, suggestively, "Songs", which will appear as a folder inside F:\FTP, which, double clicked, will bring the user to G:\, as if it actually were F:\FTP\Songs. Kewl eh?

 

This is how you shoul set the Uploads folder. That is, activate the Write (file) and Create (folder) rights, to allow users organize their uploads in folders (for example, they can upload files in folders named after them, so you can know who sent you that file). The uploads folder will appear as "Upload Here" in the server root. Note: disable the Delete/Execute/Remove rights to avoid L4M3 users from deleting what others have uploaded to you. Also, you can disable the Read attribute, if you want to avoid users from downloading what others uploaded.

 

You can add as many folders as you want, building a very complex server.

 

Pheewww it’s done for real now.

 

Wait! Not yet! Do you want to know how to test yor server, even if you aren’t connected to the internet? Use an FTP client, and put all the data of the server (port, username and password), BUT use 127.0.0.1 as the IP. You will connect to your own computer, and see how the server works on the user-side.

A guide to FTP clients and to downloading files from FTP servers

Well, you gotta know the server details, first of all the IP address, or, if existing, the alias (something like “nick.dyndns.org” or “nick.cjb.net”). If the server is private, as often it is, you’ll have to know the port it’s listening to (the standard one is 21, but you may find 22, 23, 59, 92, and so on… with all the numbers from 1024 to 65000) and the UserID/Password (the “Login”). Important: usually both UserID and Password are case sensitive, and preserve spaces, so if the password is “Polly Wanna Cracker” you gotta use exactly “Polly Wanna Cracker” and not “pollywannacracker”!!!

And how do you connect?

You need an “FTP Client”. If you don’t have it, and want to find a free one, just search on www.google.com for “free ftp client”. 2008 notice: the author now uses, and suggests, FileZilla, a very good free ftp client

Suppose you are connecting… after some messages like:

[04.35.51] Connected to xxx.xxx.xxx.xxx Port xx
[04.35.52] 220 Server ready ...
[04.35.52] USER XXXXXX
[04.35.52] 331 Password required
[04.35.52] PASS (hidden)
[04.35.52] 230 User logged in.
[04.35.52] SYST
[04.35.53] 215 UNIX Type: L8

you’ll start receiving the Directory Listing, and will be able to browse as it was Windows Explorer.

To download a file, usually it is sufficient to drag from where they are, to the near window, which represents your Hard Disk, and then you may need to press a button like “Go”, “Start”, “Transfer”, or search an entry like those in the menus.

To close, I’ll add a tutorial, based on FlashFXP (if you have CuteFTP, you may try as well this one, which is undoubtedly better).

Let’s suppose the server is at the address someone.cjb.net (so [FTP > Quick Connect], write someone.cjb.net near “Server:”), port 53627 (write 53627 near “Port:”), UserID equal to your current nick on IRC (if you are Joe^74 write Joe^74 near “User Name:”), and password This is a joke (what will you write? This is a joke near “Password:”, it is clear, since I told you to maintain letter cases and spaces; not of course thisisajoke, otherwise you didn’t understand a fig, so scram).

Finished? Good, then just press “Connect” and you’ll start:

[04.35.51] Connected to someone.cjb.net Port 53627
[04.35.52] 220 Server ready ...
[04.35.52] USER Joe^74
[04.35.52] 331 Password required
[04.35.52] PASS (hidden)
[04.35.52] 230 User logged in.
[04.35.52] SYST
[04.35.53] 215 UNIX Type: L8

and it’s all done.