Build CentOS 6 Server (one)-VSFTPD, ProFTPD

Source: Internet
Author: User
Tags filezilla

(a) vsftpd

Installation

    1. # yum-y Install VSFTPD
    2. Installed:
    3. vsftpd.i686 0:2.2. 2-12.el6_5. 1



Set up

  1. # Cp/etc/vsftpd/vsftpd.conf/etc/vsftpd/vsftpd.conf.backup
  2. # vi/etc/vsftpd/vsftpd.conf
  3. # do not allow anonymous users to log on
  4. Anonymous_enable=no
  5. # Set Idle time
  6. idle_session_timeout=
  7. # Set Link Timeout time
  8. data_connection_timeout=
  9. # Allow upload and download
  10. Ascii_upload_enable=yes
  11. Ascii_download_enable=yes
  12. # Welcome words after landing
  13. Ftpd_banner=welcome to myvsftpd FTP service.
  14. # does not allow general users to access the upper folder
  15. Chroot_local_user=yes
  16. Chroot_list_enable=yes
  17. # List of users who can access the upper folder
  18. Chroot_list_file=/etc/vsftpd/chroot_list
  19. # Allow folders to be deleted
  20. Ls_recurse_enable=yes
  21. # only allow users within "/etc/vsftpd/user_list" to access
  22. Userlist_enable=no



User settings

  1. # vi/etc/vsftpd/chroot_list
  2. Root
  3. #/usr/sbin/useradd ftpuser1-d/home/ftpuser1-g Nobody
  4. # passwd Ftpuser1
  5. New Password: 123456
  6. Retype New password: 123456
  7. Passwd:all authentication tokens updated successfully.
  8. # vi/etc/vsftpd/user_list
  9. Ftpuser1
  10. # Vi/etc/hosts.allow
  11. VSFTPD: 192.168. 127.0. 0.1
  12. # Vi/etc/hosts.deny
  13. Vsftpd:all



Start the service

    1. #/ETC/RC.D/INIT.D/VSFTPD Start



(ii) ProFTPD

Download installation

    1. # CD/USR/LOCAL/SRC
    2. # wget ftp://ftp.proftpd.org/distrib/source/proftpd-1.3.5.tar.gz
    3. # tar XVFZ proftpd-1.3. 5.tar.gz
    4. # CD proftpd-1.3. 5
    5. #./configure--enable-nls--PREFIX=/USR/LOCAL/PROFTPD
    6. # make
    7. # make Install



Create user

    1. # Cd/usr/local/proftpd/bin
    2. #/usr/sbin/useradd ftpuser1-d/home/ftpuser1-g Nobody
    3. # passwd Ftpuser1
    4. New Password: 123456
    5. Retype New password: 123456
    6. Passwd:all authentication tokens updated successfully.



Make a private password file

  1. # ID Ftpuser1
  2. #./ftpasswd--passwd--file=/usr/local/proftpd/etc/ftpd.passwd--name=ftpuser1 \
  3. --uid=502--gid=502--home=/home/ftpuser1--shell=/bin/bash
  4. ftpasswd:using Alternate file:/usr/local/proftpd/etc/ftpd.passwd
  5. Ftpasswd:creating passwd entry for user Ftpuser1
  6. Password:111111
  7. Re-type Password:111111
  8. Ftpasswd:entry created
  9. #./ftpasswd--group--file=/usr/local/proftpd/etc/ftpd.group \
  10. --name=ftpuser1--gid=502
  11. ftpasswd:using Alternate file:/usr/local/proftpd/etc/ftpd.group
  12. Ftpasswd:creating Group entry for group Ftpuser1
  13. Ftpasswd:entry created



Set up

  1. # Cp/usr/local/proftpd/etc/proftpd.conf/usr/local/proftpd/etc/proftpd.conf.bak
  2. Vi/usr/local/proftpd/etc/proftpd.conf
  3. ServerName "Welcome to myproftpd FTP service."
  4. Group Nobody
  5. Defaultroot ~
  6. Comment out "<anonymous ~ftp>" to "</anonymous>"
  7. Extendedlog/var/log/proftp.log All
  8. <directory/>
  9. Hidefiles ^\. *
  10. </Directory>
  11. authuserfile/usr/local/proftpd/etc/ftpd.passwd
  12. Authgroupfile/usr/local/proftpd/etc/ftpd.group
  13. Authorder mod_auth_file.c
  14. Maxclientsperhost 2
  15. MaxClients
  16. Pathallowfilter \. (JPG|GIF|PNG|JPEG) $
  17. Maxstorefilesize 3 Mb
  18. Listoptions-a maxfiles



Startup scripts

    1. # cd/usr/local/src/proftpd-1.3. 5/contrib/dist/rpm
    2. # CP PROFTPD.INIT.D/ETC/INIT.D/PROFTPD
    3. # VI/ETC/INIT.D/PROFTPD
    4. # chmod +X/ETC/INIT.D/PROFTPD



Start the service

    1. #/ETC/INIT.D/PROFTPD Start



FTP Validation Test
C:\Documents and Settings\rensanning>ftp

Connection
Ftp> op
To 192.168.21.xxx
Connected to 192.168.21.xxx.
Welcome to myproftpd FTP service.
User (192.168.21.xxx: (None)): Ftpuser1
331 Specify the password.
Password:
Successful Login.

Change Folder
ftp> pwd
257 "/"
Ftp> cd/root/
550 Failed to change directory.
Ftp> cd/etc/
550 Failed to change directory.

Uploading files
Ftp> put C:\test.txt
PORT command successful. Consider using PASV.
Ok to send data.
226 Transfer complete.
Ftp:7 Bytes sent in 0.00Seconds 7000.00kbytes/sec.

Confirm File
Ftp> ls-l
PORT command successful. Consider using PASV.
Here comes the directory listing.
-rw-r--r--1 503 503 7 11:51 Test.txt
226 Directory send OK.
ftp:66 bytes received in 0.00Seconds 66000.00kbytes/sec.

Download file
Ftp> Get Test.txt
PORT command successful. Consider using PASV.
Opening ASCII mode data connection for Test.txt (7 bytes).
226 Transfer complete.
Ftp:7 bytes received in 0.00Seconds 7000.00kbytes/sec.

Ftp> bye
221 Goodbye.

Client Tools:
ffftp:http://sourceforge.jp/projects/ffftp/
filezilla:https://filezilla-project.org/

Build CentOS 6 Server (one)-VSFTPD, ProFTPD

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.