久久r热视频,国产午夜精品一区二区三区视频,亚洲精品自拍偷拍,欧美日韩精品二区

您的位置:首頁技術文章
文章詳情頁

centos 搭建ftp服務器詳解及簡單介紹

瀏覽:178日期:2023-03-25 09:40:15

centos 搭建ftp服務器

1.安裝vsftpd

sudo yum install vsftpd

2.配置vsftpd.conf


# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=NO

# When SELinux is enforcing check for SE bool ftp_home_dir
local_enable=YES


write_enable=YES

# 本地的ftp目錄地址
local_root=/var/ftp

3.添加ftp用戶

#創建用戶
adduser -d /var/ftp -g ftp -s /sbin/nologin *_ftp

#修改密碼
passwd *_ftp


4.上傳權限

# 修改上傳路徑權限 777  更具個人喜好設置權限
sudo chmod -R 777 /var/ftp

# 查看 ftp 設置
getsebool -a|grep ftp

ftp_home_dir --> on
ftpd_anon_write --> off
ftpd_connect_all_unreserved --> off
ftpd_connect_db --> off
ftpd_full_access --> on
ftpd_use_cifs --> off
ftpd_use_fusefs --> off
ftpd_use_nfs --> off
ftpd_use_passive_mode --> off
httpd_can_connect_ftp --> off
httpd_enable_ftp_server --> off
sftpd_anon_write --> off
sftpd_enable_homedirs --> off
sftpd_full_access --> off
sftpd_write_ssh_home --> off
tftp_anon_write --> off
tftp_home_dir --> off

# 修改ftp_home_dir、ftpd_full_access 為 on
setsebool -P ftp_home_dir=on ftpd_full_access=on

5.設置vsftp 開機啟動

chkconfig vsftpd on

6.添加防火墻

firewall-cmd --permanent --add-service=ftp

firewall-cmd --reload

感謝閱讀,希望能幫助到大家,謝謝大家對本站的支持!

標簽: FTP
相關文章:
主站蜘蛛池模板: 皮山县| 东乡| 卢龙县| 绥中县| 都匀市| 安图县| 章丘市| 莒南县| 常德市| 杨浦区| 咸宁市| 弥勒县| 张家口市| 六安市| 囊谦县| 通榆县| 巨野县| 五常市| 钟山县| 临高县| 桐庐县| 崇明县| 渝北区| 广河县| 顺平县| 无棣县| 普兰县| 青岛市| 瓦房店市| 毕节市| 文成县| 名山县| 宾川县| 庆阳市| 柯坪县| 鹤壁市| 深泽县| 太康县| 营山县| 嘉义市| 修文县|