Use windows desktop ftp to upload files to the linux server, and upload files to linux
First, install ftp on the linux Server
[Root @ host2 test] # yum-y install ftp vsftpd
[Root @ host2 test] # service vsftpd start
[Root @ host2 test] # chkconfig vsftpd -- list
[Root @ host2 test] #/etc/init. d/iptables stop
[Root @ host2 test] # ftp 192.168.0.142
Connected to 192.168.0.142 (192.168.0.142 ).
220 (vsFTPd 2.2.2)
Name (192.168.0.142: root): ftp
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
Ftp> cd pub
250 Directory successfully changed.
Ftp> put/root/test/test.txt
Local:/root/test/test.txt remote:/root/test/test.txt
227 Entering Passive Mode (192,168, 0,142,140,140 ).
550 Permission denied.
Ftp> quit
221 Goodbye.
// Directly install the service. After Anonymous logon, the system will prompt that access is denied when uploading files. In this case, we need to modify some files.
[Root @ host2 test] # getsebool-a | grep ftp
Allow_ftpd_anon_write --> off
Allow_ftpd_full_access --> off
Allow_ftpd_use_cifs --> off
Allow_ftpd_use_nfs --> off
Ftp_home_dir --> off
Ftpd_connect_db --> off
Ftpd_use_fusefs --> off
Ftpd_use_passive_mode --> off
Httpd_enable_ftp_server --> off
Tftp_anon_write --> off
Tftp_use_cifs --> off
Tftp_use_nfs --> off
[Root @ host2 test] # setsebool-P allow_ftpd_anon_write 1 //-P is permanently saved and takes effect
[Root @ host2 test] # setsebool-P allow_ftpd_full_access 1
[Root @ host2 test] # setsebool-P ftp_home_dir 1
[Root @ host2 test] #! Get
Getsebool-a | grep ftp
Allow_ftpd_anon_write --> on
Allow_ftpd_full_access --> on
Allow_ftpd_use_cifs --> off
Allow_ftpd_use_nfs --> off
Ftp_home_dir --> on
Ftpd_connect_db --> off
Ftpd_use_fusefs --> off
Ftpd_use_passive_mode --> off
Httpd_enable_ftp_server --> off
Tftp_anon_write --> off
Tftp_use_cifs --> off
Tftp_use_nfs --> off
[Root @ host2] # vim/etc/vsftpd. conf // modify configuration parameters
Anon_mkdir_write_enable = YES // you can create directories anonymously.
Anon_other_write_enable = YES // anonymous deletion, rename
Anon_upload_enable = YES // whether anonymous users can upload files
[Root @ host2] # service vsftpd restart
[Root @ host2 ftp] # cd/var/ftp
[Root @ host2 ftp] mkdir ftp_test
[Root @ host2 ftp] chown ftp: root ftp_test // modify the user owner
Then you can test it ~~
Create, rename, and delete files anonymously.
If error 550 is reported, the server's permission settings are incorrect. If 553 is reported, the configuration file is faulty.
Appendix:/Etc/vsftpd. conf configuration parameters
Key field significance: anonymous_enable = YES # enable Anonymous sharing
Local_enable = YES # enable local account sharing
Write_enable = YES # whether the local account can be written
Anon_upload_enable = YES # whether anonymous users can upload files
Anon_mkdir_write_enable = YES # You can create directories anonymously.
Anon_other_write_enable = YES # anonymous Delete, rename
Chroot_local_user # block a local account
Anon_root =/abc # define the/abc directory as the root directory of an anonymous user
Anon_umask = 022 # define the mask value uploaded by anonymous users
Listen_address = 192.168.0.5 # define the listening address as 192.168.0.5
Listen_port = port number
Listen_address = IP Address
Max_clients = maximum number of concurrent connections
Max_per_ip = maximum number of concurrent connections of the same IP address
Anon_max_rate = anonymous user access speed (byte/second)
Local_max_rate = local user access speed (byte/second)
In the field userlist_enable = YES or NO // whether to enable the user_list File
When the field userlist_deny = NO, user_list is a whitelist.
/Etc/vsftpd/ftpusers (blacklist)
/Etc/vsftpd/user_list (black/white list)
Default vsftpd service:
Anonymous FTP access is allowed. You can only download files and cannot upload files [/var/ftp /]
Allow local users to access FTP, which can be downloaded or uploaded 【~ User Name]