FTP server setup
I want to turn my extra computer into an FTP server to hold day of defeat source maps for fast download, so what would be the best Linux OS to run and does anyone have a step by step instuction on how to do this.
I want to learn Linux applications, so any help would be appreciated!
Ok first off you will need an apache server and Proftpd as the sv_downloadurl stuff for source cfg files does NOT support FTP only HTTP. What I have done is taken my old Shuttle box and put mandrake 2005 limited edition on it. I run Proftpd that comes with the distro also I run apache. These both need to be selected at install to work. You need to check apache and proftpd under servers in the install. Now Setting up an FTP is prety strait forward and simple if you know a bit about linux first you need to edit your /ect/proftpd.conf file. For an example I will show you mine feel free to use anypart of it as it's a mix of many confs from online. To edit these files in a command line or shell you type vim filename so this would look like
this will take you to this window or close to it.
ServerName "Name Of Server"
ServerAdmin "Admins Email"
# Port 21 is the standard FTP port.
# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
# To prevent DoS attacks, set the maximum number of child processes
# to 30. If you need to allow more than 30 concurrent connections
# at once, simply increase this value. Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd).
# Set the user and group under which the server will run.
User "a admin NOT root"
Group ftp "the admin should be a member of both adm and ftp"
# To cause every FTP user to be "jailed" (chrooted) into their home
# directory, uncomment this line.
DefaultRoot ~ ftp
AccessGrantMsg "Welcome %u"
# Normally, we want files to be overwriteable.
#No Transfer Timeout
#Delete Parcial Uploads
#Hide Uploading Files
# Limit the maximum number of logins
# grant login only for members of the group
DenyGroup !ftp, !adm "this will Deny any one that is not a member of these 2 groups"
IdentLookups off "make sure this is off it slows connections down"
# Logging formats
LogFormat default "%h %l %u %t \"%r\" %s %b"
LogFormat auth "%v [%P] %h %t \"%r\" %s"
LogFormat write "%h %l %u %t \"%r\" %s %b"
# every login
ExtendedLog /var/log/proftpd/ftp_auth.log AUTH auth
# file/dir access
ExtendedLog /var/log/proftpd/ftp_access.log WRITE,READ write
"hit :wq to write and quit"
This is a prety easy config with no bandwidth limiting as my FTP is on a OC12 line and I really don't have to worry about useage. Next you need to setup apache well it should be setup when you install if you select apache from servers.
the apache config we need to edit is /etc/httpd/conf/commonhttpd.conf so again we vim /etc/httpd/conf/commonhttpd.conf now means the apache file is basicly stock for mine I'll just show you the line I had to edit to getthis to work. First we need an Alias to the FTP folder if you do it like me you will have users that are members of the ftp group and their folders are their home folders. So here we go.
look for the part of the conf with 2 Alias lines they look like this
Alias /icons/ /var/www/icons/
Alias /doc /usr/share/doc
Now we need to add to that with our ftp dir.
so it will be something like
Alias /download /home/ftpusername "this is the home folder of your ftp user that you will upload all your custom stuff to."
then you will need to comment out some lines by adding # in front of them
look for these lines
Restricted set of options
Options -All -Multiviews
Deny from all
Add the # in front of them to look like this
#Restricted set of options
# Options -All -Multiviews
# AllowOverride None
# <IfModule mod_access.c>
# Order deny,allow
# Deny from all
hit :wq this will write and quit
ok now for the test you should beable to type http://yourip/download/ and see the contents of the ftp folder you have. If you get a 403 error you did not comment the right lines in the previous conf. try again.
This is the exact way I run the Clan XF CSS servers we have 6 total servers running different mods and all download from a web server just like this. For an example of how fast it works you can connect to 220.127.116.11:27015 thats our westcoast CSS Deathmatch server and you'll need to download maps and sounds for it but it's very fast.
now in your server.cfg for DOD type sv_downloadurl "http://yourip/download/"
in this download folder you will need maps materials and sounds if you are useing custom sounds or maps.
The last thing you need to make sure as that if you are behind a router or firewall that you allow ports 21,80, and 8080. That should be all good luck. O and to copy form a post like this and past in a conf file in linux you need to highlight the text hit ctrl+c and then righ click in the commandline or if you are using a text editor just ctrl+v. Enjoy.
Or, if you don't need an extra server running for FTP, just configure VSFTPD and allow FTP through your firewall? You don't need Apache to run FTP; however, the above quote is good information. But you only asked about FTP and given your post, VSFTPD is the way to go with minimal fuss and less configuration.
The only reason I put Apache in the mix is for the reason that he asked about it for faster dolwnloads for his DODS server (I assume he means for clients to download his custom stuff when connecting to his server). The download program or config for any Source game can not use FTP only HTTP. So I gave him the way I run mine. Just so it's clear I'm not trying to be a prick just pointing out all that was asked and why I posted as I did.
I forgot to add in there that when you do the http://yourip/download/ make sure if you are behind a firewall or router that you use your Public IP (the one your ISP gives you) not your private(the 192.168 one). Also the main reason I feel this is probably the bestway to run a downloadurl server is because of the ease of use. All you have to do when you put a new custom map on your server is log into the ftp goto the maps dir you made and put the .nav and .bsp files in there and log out. Thats all it's done. No need to restart anything the server will atomaticlu refresh the dir the next time you browse it. Also this is great if you run multiple server with multiple admins. No need to give them all logins to your Linux box to move files around. All they have to do is use the ftp account and they are done.
Well, if you are using an entire drive. Try OpenBSD, its installation is not that bad if you let the installer automatically slice up your hdd, also server apps such as ftpd and sshd are automatically installed for you. You'll just install, very fast I might add, set up your conf file, then leave it alone :) Thats it