VSFTP is a simple service setup experience (for beginners! Learning RHCE. Sort out the exercises based on the articles and exercises of the instructors and redking. 1. Install the VSFTP package Yumlist | grepftpYuminstallvsftpd. configuration files related to i3862 and VSFTP:/etc/vsftpd. conf: Core configuration file. /Etc/vsftpd/ftpusers: It is used by default to specify users who cannot log on to FTP/e
VSFTP is a simple service setup experience (for beginners!
Learning RHCE. Sort out the exercises based on the articles and exercises of the instructors and redking.
1. Install the VSFTP package
Yum list | grep ftp
Yum install vsftpd. i386
2. VSFTP configuration files:
/Etc/vsftpd. conf: Core configuration file.
/Etc/vsftpd/ftpusers: by default, it is used to specify users who cannot log on to FTP
/Etc/vsftpd/user_list: Specifies the list of users that can be accessed by default.
/Var/ftp: default root directory after anonymous users log on to FTP
3. service setup goals:
Anonymous Users can upload and download files and create directories.
4. vsftpd. conf file configuration: The red part is enabled.
**************************************** ***
Anonymous_enable = YES allows anonymous users to access
Local_enable = YES
Write_enable = YES
Local_umask = 022
Anon_upload_enable = YES allows anonymous users to upload files
Anon_mkdir_write_enable = YES allows anonymous users to create directories
Dirmessage_enable = YES
Xferlog_enable = YES
Connect_from_port_20 = YES
# Chown_uploads = YES
# Chown_username = whoever
# Xferlog_file =/var/log/vsftpd. log
Xferlog_std_format = YES
# Idle_session_timeout = 600
# Data_connection_timeout = 120
# Nopriv_user = ft1_cure
# Async_abor_enable = YES
# Ascii_upload_enable = YES
# Ascii_download_enable = YES
Ftpd_banner = Welcome to blah FTP service.
# Deny_email_enable = YES
# Banned_email_file =/etc/vsftpd/banned_emails
# Chroot_list_enable = YES
# Chroot_list_file =/etc/vsftpd/chroot_list
# Ls_recurse_enable = YES
Listen = YES
# Listen_ipv6 = YES
Pam_service_name = vsftpd
Userlist_enable = YES
Tcp_wrappers = YES
****************************************
5. Directory settings:
The default full permission for the/var/ftp directory is 755. Do not modify this permission. If you modify and restart the VSFTP service, an error is returned.
Create a directory under the/var/FTP directory to upload files and adjust the permissions.
Mkdir/var/ftp/comatrix
Chown ftp/var/ftp/comatrix; chgrp ftp/var/ftp/comatrix any
Chmod 755 commp any
6. selinux settings:
Getsebool-a | grep ftp
**************************************** **
[Root @ server booleans] # getsebool-a | grep ftp
Allow_ftpd_anon_write --> Anonymous User Write Permission In on FTP service
Allow_ftpd_full_access --> off
Allow_ftpd_use_cifs --> off
Allow_ftpd_use_nfs --> off
Allow_tftp_anon_write --> off
Ftp_home_dir --> on
Ftpd_disable_trans --> off can disable the restriction of Selinux on VSFTP service.
Ftpd_is_daemon --> on
Httpd_enable_ftp_server --> off
Tftpd_disable_trans --> off
**************************************** ******
Setsebool-P allow_ftpd_anon_write on