安裝、配置和驗證FTP服務器的步驟
更新時間:2024年12月10日 15:46:24 作者:月光技術雜談
文章介紹了如何安裝、配置和驗證FTP服務器的步驟,包括安裝vsftpd、配置文件設置、創(chuàng)建用戶、設置密碼和建立主目錄,最后進行了本地驗證,感興趣的朋友跟隨小編一起看看吧
ftp服務器搭建-安裝、配置及驗證
#安裝
sudo apt-get install vsftpd
#配置文件
cat > /etc/vsftpd.conf << "EOF" listen=NO listen_ipv6=YES anonymous_enable=NO local_enable=YES write_enable=YES dirmessage_enable=YES use_localtime=YES xferlog_enable=YES connect_from_port_20=YES chroot_local_user=YES chroot_list_enable=YES chroot_list_file=/etc/vsftpd.chroot_list secure_chroot_dir=/var/run/vsftpd/empty pam_service_name=ftp rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key ssl_enable=NO local_root=/home/test #需要建立 對應的root dir EOF
#創(chuàng)建用戶
echo test > /etc/vsftpd.chroot_list
#設置密碼
password test
#建立主目錄
mkdir /home/test sudo chmod -R 777 /home/test touch test #放一個測試文件
#本地驗證
root@localhost:/home/ftp# ftp localhost Connected to localhost. 220 (vsFTPd 3.0.5) Name (localhost:root): test 331 Please specify the password. Password: 230 Login successful. Remote system type is UNIX. Using binary mode to transfer files. ftp> dir 200 EPRT command successful. Consider using EPSV. 150 Here comes the directory listing. -rw-r--r-- 1 0 0 13 Nov 24 15:46 test 226 Directory send OK. ftp> get test local: test remote: test 200 EPRT command successful. Consider using EPSV. 150 Opening BINARY mode data connection for test (0 bytes). 226 Transfer complete.
到此這篇關于ftp服務器搭建-安裝、配置及驗證的文章就介紹到這了,更多相關ftp服務器搭建內容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關文章希望大家以后多多支持腳本之家!
相關文章
Linux下使用vsftp搭建FTP服務器(附參數(shù)說明)
本章主要介紹在Linux中搭建FTP服務器的過程,需要掌握的要點是配置文件的合理配置,需要的朋友可以參考下2019-04-04
IIS FTP 出現(xiàn) 530 User cannot log in, home Directory Inaccessib
今天幫客戶處理ftp的時候,因為目錄問題,導致FTP 出現(xiàn) 530 User cannot log in, home Directory Inaccessible 錯誤,按照下面的方法解決了2012-04-04

