Thursday, June 24, 2010

FTP Server on Ubuntu Server

Today to talk about how I setup an ftp server for my company. As my company works on product and need to send the new releases to clients(this was done through adrive.com), my boss told me to setup an ftp server for the company so that the release can be easily copied to the server on LAN and then the clients can download it from the FTP server, so that the adrive upload could be eliminated. There is already an SVN based code server with ubuntu server operating system active in the company, so the remaining to do was not a tough job. here is how I did it with proftpd,

the following few commands made the ftp server running/active,

  • sudo apt-get install proftpd
  • sudo vi /etc/shells (appended the following line to the opened file)
/bin/false
  • sudo mkdir /home/release (this created a folder/directory named release inside /home directory)
  • sudo useradd client -p client -d /home/release -s /bin/false
  • sudo chmod 775 /home/release
  • sudo vi /etc/proftpd/proftpd.conf (edited the file as below)
Changed/added/Uncommented(i.e. removed #) the four lines in the file as
DefaultRoot /home/release
DefaultRoot ~
DenyFilter \*.*/
DisplayLogin /usr/msgs/welcome.msg (Setting up This will display/send a welcome message when user is authenticated)
  • sudo vi /usr/msgs/welcome.msg
Added the following line to the welcome.msg file
Welcome %U to My Company's FTP Server
Login Time is : %T
  • sudo /etc/init.d/proftpd restart
Now the ftp server got ready. I was able to access the ftp server using the URL
ftp://client:client@myftpservername
Also I accessed the same using filezilla where the host was "myftpservername" and user "client" and password "client".

Later I compelled to change the client password so i did it using
  • sudo passwd client
Then it asked for the new password and I updated the client password with the "new password"

For further clarifications or making server more secure go through this link http://ubuntuforums.org/showthread.php?t=79588