linux安装vsfftpd

安装vsftpd:    yum install vsftpd
sudo useradd -m ftp
sudo passwd ftp
sudo chmod 777 /home/ftp
修改vsFTPd的配置 
  cd /etc/vsftpd/    vi vsFTPd.conf
监听地址和端口,是否打开tcp、psav模式等等
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
ascii_upload_enable=YES
ascii_download_enable=YES
chroot_local_user=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd/chroot_list
listen=YES


pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
user_config_dir=/etc/vsftpd/user_conf


drwxr-xr-x. 2 root root 4096 Dec 1 16:39 user_conf
[root@cloud user_conf]# more work 
local_root=/home/work/wwwroot 
[root@cloud user_conf]# more ftp 
local_root=/home/work/wwwroot
启动vsFTPd服务 
service vsftp start 或 /etc/init.d/vsftp start 
sudo /etc/init.d/vsftpd restart
sudo /etc/init.d/vsftpd start
sudo /etc/init.d/vsftpd stop


cat /etc/passwd
vi /etc/passwd
work:x:501:501::/home/work/wwwroot:/bin/bash
ftp:x:14:50:FTP User:/var/ftp:/bin/bash


验证:ftp 172.0.0.1 
查看SELinux状态:
1、/usr/sbin/sestatus -v      ##如果SELinux status参数为enabled即为开启状态
SELinux status:                 enabled
2、getenforce                 ##也可以用这个命令检查
关闭SELinux:
1、临时关闭(不用重启机器):
setenforce 0                  ##设置SELinux 成为permissive模式
                              ##setenforce 1 设置SELinux 成为enforcing模式
2、修改配置文件需要重启机器:
修改/etc/selinux/config 文件
将SELINUX=enforcing改为SELINUX=disabled
重启机器即可
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值