1 / 14

FTP SERVER

FTP SERVER. LINUX. By Chinedu Eze Richard Ajayi. WHAT IT IS:. F – File T - Transfer P – Protocol A protocol for transferring data between host computers and remote servers - FTP server – a server / software that runs the FTP protocol for transferring and manipulating files.

bary
Download Presentation

FTP SERVER

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. FTP SERVER LINUX By Chinedu Eze Richard Ajayi

  2. WHAT IT IS: F – File T - Transfer P – Protocol • A protocol for transferring data between host computers and remote servers - FTP server – a server / software that runs the FTP protocol for transferring and manipulating files.

  3. ADVANTAGES: • Resume aborted uploads/downloads • Easy to use esp. large file upload download handling • Lower band width consumption • Built in error checking • Fast • Many more… DISADVANTAGE: • Not secured as passwords and usernames are sent in plain text – Sftp • Users may be able to compromise system

  4. Solution: • Ch’Root FTP • All users are virtual – system only see a single user…all ftp users are under this one user • Users are automatically redirected to their home directory • Ftp users do not have bash or any other shell • But they got a few ‘mild’ commands e.g. ‘ls’, ‘mkdir’… • Users cannot access system files • …many other restrictions apply depending on choice of administrator.

  5. Our choice of FTP server: • Pure-FTPd server • Its secured, small in size and very easy to install and configure…well, ‘easy’??? • written by ArntGulbrandsen around 1995 • based on Troll-FTPd • Free - BSD license; open source??? • Does not need configuration files; settings are given as command line arguments and changes are applied on the fly • However, configuration files cóuld be used if prefered

  6. Procedures: • install pure-ftpd: • #sudo apt-get install pure-ftpd pure-ftpd-common ---server is started automatically with default settings • Create a group for the ftp server users: • #sudo groupadd ftpgroup • ---all ftp server users would belong exclusively to this group

  7. Procedures: Cont’d… • Create the ftp system user: • #sudo useradd -g ftpgroup -d /dev/null -s /etc ftpuser • -g ftpgroup: the group that was previously created to ftpusers • -d /dev/null: this user do not a home directory • -s /etc: this user do not have a command line interpreter e.g. bash • ftpuser: this is the name of the user; all the ftp user belong to this user… the system only sees this user

  8. Procedures: Cont’d… • Create home directory for the ftp users (base directory): • #sudo mkdir /home/ftpusers • create directory for each ftp user: • #sudo mkdir /home/ftpusers/username • ---user dir: ftpuser001 – ftpuser005 • add the user to the pure-ftpd : • #sudo pure-pw useradd username -u ftpuser -d /home/ftpusers/username • ---username: ftpuser001 • ---pure-pw: pureftpd command

  9. Procedures: Cont’d… • After adding the users, create/update the user database: • #sudo pure-pw mkdb • create symbolic links between the respective files: • #sudo ln -s /etc/pure-ftpd/pureftpd.passwd /etc/pureftpd.passwd • #sudo ln -s /etc/pure-ftpd/pureftpd.pdb /etc/pureftpd.pdb • #sudo ln -s /etc/pure-ftpd/conf/PureDB /etc/pure-ftpd/auth/PureDB • ---so that they are accessible from the etc folder directly

  10. Procedures: Cont’d… • permissions of /home/ftpusers and subdirectories: • #chown -hR -v ftpuser:ftpgroup /home/ftpusers • ---owner is ftpuser • ---group is ftpgroup • lastly restart PureFTPD: • #sudo /etc/init.d/pure-ftpd restart • ...then issue this command: • #/usr/sbin/pure-ftpd -S 192.168.10.50,21 -c 10 -C 2 -l puredb:/etc/pureftpd.pdb -X -E -j -R -T 100 -k 90 -A -u 100

  11. Meaning of command: • #/usr/sbin/pure-ftpd – name of the pureftpd service • -S 192.168.10.50,21 – bound server to that address and that port • -c 10 – maximum of 10 simultaneous users • -C 2 – maximum of 2 simultaneous users on the same IP address • -l puredb:/etc/pureftpd.pdb – authenticate users with this database instead of the linux authentication for example • -X – users do not access hidden files • Type “man pure-ftpd” for more details and more commands

  12. Meaning of command: • -E – only authenticated users (no anonymous allowed) • -j – create user directories at user creation if not specified • -R – chmod command not allowed • -T 100 – upload and download bandwidth limit is 100 KB/s • -k 90 – no uploads for disk 90% full • -A – everyone is chrooted except root • -u 100 – uid’s below 100 not allowed (they should be for system admins’)

  13. Screen shot:

  14. Thanks for your time • References: • http://www.chinalinuxpub.com/doc/www.siliconvalleyccie.com/index.htm • http://www.linuxhomenetworking.com/ • http://www.roseindia.net/linux/linux-ftp-server-how-to.shtml • http://www.faqs.org/docs/Linux-mini/FTP.html#toc6 • http://www.faqs.org/docs/securing/chap29sec298.html • http://www.debianhelp.co.uk/pureftp.htm • http://linuxservertutorials.blogspot.com/2008/11/configure-ftp-server-on-ubuntu.html • http://en.wikipedia.org/wiki/Pure-FTPd

More Related