1 ftp
1.1 ftp server
1. Install vsftpd server
sudo apt-get install vsftpd
2. Configure the vsftpd.conf file
south you /etc/vsftpd.conf
Add the following settings
anonymous_enable= YES //Allow anonymous users to access
anon_root =/home/cgw/ ftp //The root directory where anonymous users log in to the server
no_anon_password = YES // No password required for anonymous users
write_enable = YES //Allow anonymous users to write
anon_upload_enable = YES //Allow anonymous users to upload
anon_mkdir_write_enable =YES //Allow anonymous users to add directories
3. Restart the server and reload the /etc/vsftpd.conf configuration file
sudo /etc/init.d/vsftpd restart
4. Enter your /home/xingwenpeng/ftp directory to create an empty directory for users to upload
cd ~ / ftp
mkdir anonymous
chmod 777 anonymous
5. Test the upload function, log in to the ftp server, and enter the anonymous directory
ftp IP
cd anonymous
6. The upload command can upload the files in your current directory to the anonymous directory of the ftp server
put somefile
1.2 ftp client
Ubuntu has ftp client installed by default
2.3 lftp client
lftp is also an ftp client program. It operates in a textual way, but is more
convenient . lftp has almost all the convenient functions of bash. Tab completion, bookmark, queue, background download, etc. can
be supported. The usage is similar to ftp, the main commands are as follows:
put upload file
mput upload multiple files
get download file
mget download multiple files
mirror download the entire directory and its subdirectories
mirror -R upload the entire directory and its subdirectories
!command call the local shell to execute the command command
Note that some distributions may not have the lftp tool installed by default, and users need to install it themselves. If it is a Debian or
Ubuntu system, install the lftp package.
sudo apt-get install lftp