FTP Server built under Linux

Source: Internet
Author: User

                         FTP Server built under Linux

Project requirements: 1. Install the Linux system and build the FTP server.

2. Enable local user login; an administrative user (can manage a normal user), multiple ordinary users (unable to log on to the system, no access to other directories, only access to their home directory) group mode.

First, install the Linux system

1. Start the computer by CD

  

Enter

  

Skip Skip, Infinity next ...

  

, enter the password, and verify the password,

  

Next->

  

Next-> Choose Basic server-> then select Customize Now (custom installation)->next

  

Select Servers-> to the right to select FTP server (required)->next

  

Wait for the installation end-click Reboot, restart after the user name root, password ******, you can enter the system

  

2. Set the IP address

Enter the Setup command to enter the settings screen

  

Use the SPACEBAR to remove the asterisk in the using DHCP []

  

Save and exit when configured.

Use the command ifup eth0 to make it effective,

Command Service network Restart Restart the network service,

Command ifconfig to view the IP address.

3. Start the FTP service (VSFTPD)

(1) Set up the FTP service boot automatically

  

  

(2) View and open the FTP service

PS Ax|grep vsftpd See if the FTP service is turned on

Service VSFTPD start to open the FTP service (such as first view does not turn on FTP service, second view FTP service is turned on)

  

4. Turn on the firewall

  

  

Save and exit.

Second, configure the/etc/vsftpd/vsftpd.conf file.

VI vsftpd.conf

Input I start editing

1anonymous_enable=NO2 setting does not allow anonymous access3local_enable=YES4 set the local user to be accessible. Note: Primarily for virtual hosting users, if the item is set to No then all virtual users will not be able to access it. 5write_enable=YES6 The settings can be written. 7local_umask=0228 sets the permission mask for the file after uploading. 9anon_upload_enable=NOTen prohibit anonymous users from uploading.  Oneanon_mkdir_write_enable=NO A prevents anonymous users from creating directories.  -dirmessage_enable=YES - Set the Open Directory banner feature.  thexferlog_enable=YES - set the Enable logging function.  -connect_from_port_20=YES - set Port 20 for the data connection.  +chown_uploads=NO - set prohibit upload file change host.  +xferlog_file=/var/log/Vsftpd.log A set the VSFTPD service log save path. Note that the file does not exist by default. You have to touch it manually, and because of this change, the VSFTPD service host user is the manually established VSFTPD. You must be aware of the Write permission to the log for that user, or the service will fail to start.  atxferlog_std_format=YES - The settings log uses a standard record format.  -idle_session_timeout= - - Set the idle connection timeout, where default is used. Specify the specific values for each specific user, if not specified, or use the default value here of 600, per second.  -data_connection_timeout= - - set a single maximum continuous transfer time, where default is used. Specify the specific values for each specific user, if not specified, or use the default value here of 120, per second.  inFtpd_banner=Welcome to 777K FTP service - set the VSFTPD landing banner.  tochroot_list_enable=NO + prevents users from logging out of their own FTP home directory.  -chroot_list_file=/etc/vsftpd/chroot_list (chroot_list file needs to be created manually) thelisten=YES *userlist_enable=YES $Users in the set Userlist_file will not be allowed to use FTP.

Enter ESC

: Wq Save and exit

Restart the FTP service vsftpd restart

Third, establish Local users

adduser-d/home/admin Admin (Admin user)

passwd Admin

adduser-d/home/admin/sunone sunone (normal User 1 belongs to admin group)

passwd SunOne

adduser-d/home/admin/suntwo suntwo (normal user 2 belongs to admin group)

passwd Suntwo

Change the SunOne and Suntwo permissions to admin

Chown Sunone:admin/home/admin/sunone

Chown Suntwo:admin/home/admin/suntwo 

Iv. Resolving vsftp oops:cannot Change directory:/home/******* error (SELinux status modified)

Command sestatus-b|grep FTP View status is all off, the second line needs to change the state to on

Setsebool-p allow_ftpd_full_access on (set not on state)

Five, set the user cannot log on the system

vi/etc/passwd

Change to Nologin

Vi. other technical personnel of the project

Jason, ACAN

------above to change all content of the article-------

------No following------

      

FTP Server built under Linux

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.