FTP Local Server Setup
Yum Installation VSFTPD Service:
[Email protected] ~]# yum-y install VSFTPD
To create a local two user:
[Email protected] ~]# Useradd test1
[Email protected] ~]# Useradd test2
[Email protected] ~]# echo "123" | passwd--stdin test1 &>/dev/null
[Email protected] ~]# echo "123" | passwd--stdin test2 &>/dev/null
[[email protected] ~]# ID test1
uid=501 (test1) gid=501 (test1) groups=501 (test1)
[[email protected] ~]# ID test2
uid=502 (test2) gid=502 (test2) groups=502 (test2)
Backup configuration file and configuration:
Backup:
[[email protected] ~]# Cp/etc/vsftpd/vsftpd.conf{,.bak}
[Email protected] ~]# ls/etc/vsftpd/
Ftpusers user_list vsftpd.conf Vsftpd.conf.bak vsftpd_conf_migrate.sh
Configuration:
# Default Umask for Local users are 077. wish to 022,
# If your users expect that (022 are used by the most other ftpd ' s)
local_umask=077 //777-077=700 only allowed to be master readable writable
Chroot_local_user=yes //Lock the user's home directory (with the user's home directory as the root)
Turn on services and turn off firewalls and SELinux:
[[email protected] vsftpd]#/etc/init.d/vsftpd start
Starting vsftpd for VSFTPD: [OK]
[[Email protected] vsftpd]# service iptables stop
[Email protected] vsftpd]# Setenforce 0
Setenforce:selinux is disabled
Gen Jie test File Tags:
[Email protected] vsftpd]# Touch/home/test1/test1.txt #测试文件
[Email protected] vsftpd]# Touch/home/test2/test2.txt #测试文件
Validation results:
Test1:
Test2:
linux-12th Lesson Note-[ftp Server build]-[local ftp]-[02]