Linux set up ftp server

A. Installation

1. Installvsftpd

sudo apt-get install vsftpd 或者  yum -y install vsftpd

2. Related Profiles

cd /etc/vsftpd

  

  • /etc/vsftpd/vsftpd.conf // main configuration file, core configuration files
  • /etc/vsftpd/ftpusers // blacklist, the user is not allowed to access the inside of the FTP server
  • /etc/vsftpd/user_list // white list, allowing users to access the FTP server list

3. Start Services

systemctl enable vsftpd.service // set the boot from the start

systemctl start vsftpd.service // start ftp service

netstat -antup | grep ftp View // ftp service port

4. Log Configuration

  1. anonymous users

    vxftpd after installation is enabled by default anonymous users without a password the user can log in directly

    Anonymous ftp configuration settings in /etc/vsftpd/vsftpd.conf.

    vim vsftpd.conf
     

      anonymous_enable=NO // default is the YES NO OFF  

  2. Configure the local user login

# Create a login user

useradd ftptest #创建ftptest用户

passwd ftptest #修改ftptest用户密码

 

  vim user_list

   

 

 

   Users speak a line of its own users to join

   vim vsftpd.conf

   local_enable = YES is set to YES

  3. The user logs on other configuration instructions   

parameter Explanation
anonymous_enable=YES Accepts anonymous users
no_anon_password=YES Do not ask anonymous user login password
anon_root=(none) Anonymous user's home directory
local_enable=YES Accept local user
local_root=(none)

Local user's home directory

 

 

 

 

 

  

  4. User Access Control

parameter Explanation
write_enable=YES Can upload (global control)
local_umask=022 umask local users to upload files
file_open_mode=0666 Permission to upload files to use with umask
anon_upload_enable=NO Anonymous users can upload
anon_mkdir_write_enable=NO Anonymous users can build directory
anon_other_write_enable=NO Anonymous users to modify delete
chown_username=lightwiter Upload your user name anonymous file

 

Guess you like

Origin www.cnblogs.com/jelly-wt/p/11470587.html