FTP upload and download application under LINUX (based on Beihua University network 16-level Linux)-cyl

  • The first step: yum install -y vsftpd
    write picture description here
    Use the following command #rpm -qa |grep vsftpd to detect whether the vsftpd software is installed,

  • The second step vsftpd configuration
    There are three main ftp configuration files, located in the /etc/vsftpd/ directory, they are:
    ftpuusers This file is used to specify those users who cannot access the ftp server.
    user_list This file is used to indicate that the default account cannot access
    the ftp vsftpd.conf vsftpd main configuration file by default.
    Taking anonymous users as an example, we remove the following
    anonymous_enable=YES in the configuration file /etc/vsftpd/vsftpd.conf (allowing Anonymous login)
    anon_upload_enable=YES (allow upload)
    anon_mkdir_write_enable=YES (allow download)
    and add
    anon_other_write_enable=YES (allow new deletion) after these two sentences
    write picture description here
    to complete the configuration of anonymous users, at this time Anonymous users can log in to upload and download files. Remember to restart the service after modifying the configuration file.
    write picture description here

  • The third step
    write picture description here
    or
    write picture description here
    then enter setenforce 0
    and then enter cd /var/ftp
    and then enter chmod 777 pub (as shown below)
    write picture description here

  • the fourth step

Method 1: Start FTP: service vsftpd start [or restart]
Method 2: chkconfig –level 35 vsftpd on

  • The fifth step is to access files on linux on windows, open my computer, enter ftp://your linux ip and
    write picture description here
    press enter,
    write picture description here
    click anonymous access and then click confirm
  • This is your shared folder synchronization corresponding to the pub under /var/ftp in linux

write picture description here

  • Anonymous
    test
    cd /var/ftp/pub
    touch test.txt
    in Linux, refresh in pub in Windows, there is the test.txt file you created, and you can copy this file to the desktop
    "The following is the explanation, it is useless, Can be skipped directly"
    at the same time copy some files from windows to pub in the pub file in windows (if you create some folders but you can't copy the file bit text in windows, because when you create a new folder, only The corresponding linux user has permission to write to the folder), and then in linux, you can use cp to copy and download
  • So far anonymous ftp upload and download is complete
  • Upload and download with user name (user name account password is the account password of the linux account)
  • The first step vim /etc/vsftpd/vsftpd.conf
    put
    anonymous_enable=NO (anonymous login is not allowed)
    and restart vsftpd and then enter ftp://your Linux IP address in the directory address bar on windows and the account password will pop up boxed up.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325529841&siteId=291194637