linux上安装配置vsftpd
啟動:
/usr/sbin/vsftpd &
?
端口占用:
lsof -i:21
?
位置:
?whereis vsftpd
?
默認配置下,匿名用戶登錄 vsftpd 服務后的根目錄是 /var/ftp/;系統用戶登錄 vsftpd 服務后的根目錄是系統用戶的家目錄。
若要修改登錄 vsftpd 服務后的根目錄,只要修改 /etc/vsftpd/vsftpd.conf 文件即可。
假設要把 vsftpd 服務的登錄根目錄調整為 /vae/www/html,可加入如下三行:
?local_root=/var/www/html
chroot_local_user=YES
anon_root=/var/www/html 注解:local_root 針對系統用戶;anon_root 針對匿名用戶。
?
編輯 vsftpd.conf 文件后,保存退出,參照如下指令重新啟動服務: service vsftpd restart 之后 ftp 客戶端登陸 vsftpd 服務后,其根目錄是 /var/www/html。? Apache: /usr/local/apache2/htdocs
Creating an FTP Account within Linux.
For this example, I am using Vsftpd, as it is the default FTP client distributed with RedHat, however these instructions should apply to most FTP server applications.
Create a FTP user group. eg: ftpaccounts
/usr/sbin/groupadd ftpaccounts
Add a new user to this group, and set the default path of that user to /home/user/.
/usr/sbin/adduser -g ftpaccounts -d /home/user/ testuser
Set a password for the newley created user.
passwd testuser
Set ownership of /home/user to the testuser and ftpaccounts.
chown testuser:ftpaccounts /home/user
Give Read/Write access to testuser and all members in ftpaccounts
chmod 775 /home/user
Edit /etc/vsftpd/vsftpd.conf file and make sure 'local_enable=YES' is uncommented.
Restart the vsftpd service.
/etc/init.d/vsftpd restart
總結
以上是生活随笔為你收集整理的linux上安装配置vsftpd的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Oracle将NetBeans交给了Ap
- 下一篇: linux i2c 设备节点读写