启动:
/usr/sbin/vsftpd &
端口占用:
lsof -i:21
位置:
whereis vsftpd
系统用户登录 vsftpd 服务后的根目录是系统用户的家目录。
若要修改登录 vsftpd 服务后的根目录,只要修改 /etc/vsftpd/vsftpd.conf 文件即可。
假设要把 vsftpd 服务的登录根目录调整为 /vae/www/html,可加入如下三行:
local_root=/var/www/html
chroot_local_user=YES
anon_root=/var/www/html
编辑 vsftpd.conf 文件后,保存退出,参照如下指令重新启动服务: service vsftpd restart
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