1、root用戶登錄系統,在/etc下安裝FTP
執行安裝命令:zypper install -y vsftpd
2、修改配置文件:etc/vsftpd.conf文件
(1)執行:vi /etc/vsftpd.conf
(2)修改如下配置項:
# line 18: uncomment ( allow writing ),開啟任何用戶的寫權限
write_enable=YES
# line 39: uncomment
ls_recurse_enable=YES
# line 59: uncomment ( allow local user ) ,開啟本地用戶登錄服務
local_enable=YES
# line 69: uncomment ( enable chroot )
chroot_local_user=YES
# line 75: uncomment ( enable chroot list )
chroot_list_enable=YES
# line 79: uncomment ( specify chroot list )
chroot_list_file=/etc/vsftpd.chroot_list
# line 91: 不啟用匿名訪問
anonymous_enable=NO
# line 200: uncomment: ( allow ascii mode )
ascii_upload_enable=YES
ascii_download_enable=YES
# add at the bottom: specify your root directory
local_root=/home
# use local time
use_localtime=YES
3、配置FTP登錄用戶:etc/vsftpd.conf文件
# 增加用戶可以使用FTP登錄
vi /etc/vsftpd.chroot_list
root
4、重啟
關閉FTP服務,/etc下執行:chkconfig vsftpd
查看FTP服務狀態,/etc下執行: service vsftpd status
重新啟動FTP服務,/etc下執行 service vsftpd restart
關閉FTP服務,/etc下執行 service vsftpd stop