linux上安装配置vsftpd
2016-09-23 04:54
495 查看
启动:
/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
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
/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
- vsFTPD在Unix/Linux下的安装及配置
- ftp服务器vsftpd的安装与配置[ubuntu, linux]
- linux(centos) 下安装 及配置 vsftpd
- Linux RedHat as 5 vsftpd 安装配置管理
- Linux - vsFTPd 服务器的安装与配置
- linux下安装配置vsftpd(ftp)
- Linux vsftpd安装配置使用(详细)
- linux上安装配置vsftpd
- Linux vsftpd安装和配置
- linux系列--Vsftpd快速安装配置
- Linux下vsftpd的安装与配置
- 【转】Linux RedHat as 5 vsftpd 安装配置管理
- Linux vsFTPD安装与配置
- linux下安装配置vsftpd
- linux上安装配置vsftpd
- Linux 下 ftp 服务器 vsftpd 安装与简单配置 实现匿名上传下载
- linux下vsftpd的安装与配置说明
- Linux CentOS6.3安装配置vsftpd服务器详解
- linux安装vsftpd和vsftpd配置步骤