tft每日頭條

 > 科技

 > centos7ftp設置

centos7ftp設置

科技 更新时间:2025-02-09 00:41:07

centos7ftp設置?1.下載vsftpdyum install -y vsftpd,我來為大家講解一下關于centos7ftp設置?跟着小編一起來看一看吧!

centos7ftp設置(教你如何在CentOS7系統中配置ftp服務)1

centos7ftp設置

1.下載vsftpd

yum install -y vsftpd

2.設置開機自啟動

systemctl enable vsftpd.service

3.啟動

systemctl start vsftpd.service

4.查看監聽端口

netstat -antup | grep ftp

5.配置vsftpd本地用戶模式(就是配置用戶名、密碼、修改權限)

useradd ftptest passwd ftptest mkdir /var/ftp/test # 創建一個供ftp服務使用的文件目錄 chown -R ftptest:ftptest /var/ftp/test # 修改該目錄的擁有者為ftptest

6.修改配置文件:vim /etc/vsftpd/vsftpd.conf

#除下面提及的參數外,其他參數保持默認值即可。 #修改下列參數的值 anonymous_enable=NO #禁止匿名登錄FTP服務器 local_enable=YES #允許本地用戶登錄FTP服務器 listen=YES #監聽IPv4 sockets #在行首添加#注釋掉以下參數 #listen_ipv6=YES #關閉監聽IPv6 sockets local_root=/var/ftp/test chroot_local_user=YES chroot_list_enable=YES chroot_list_file=/etc/vsftpd/chroot_list allow_writeable_chroot=YES pasv_enable=YES pasv_min_port=50000 pasv_max_port=51000 pasv_address=49.235.71.50

7.創建例外用戶文件

vim /etc/vsftpd/chroot_list # 哪怕沒有例外用戶也必須創建

8.重啟

systemctl restart vsftpd.service

注意:如果使用的是雲服務器,一定要記住開放響應的端口。

,

更多精彩资讯请关注tft每日頭條,我们将持续为您更新最新资讯!

查看全部

相关科技资讯推荐

热门科技资讯推荐

网友关注

Copyright 2023-2025 - www.tftnews.com All Rights Reserved