linux如何yum安装ftp失败,centos yum安装ftp 及解决vsftp错误500 OOPS: cannot change directory:/home/**...

centos yum安装ftp 及解决vsftp错误500 OOPS: cannot changedirectory:/home/**

1.查看服务器有没有安装ftp包

rpm -qa |grep vsftp

2.yum安装

yum -y install vsftpd

3.启动vsftp的服务

service vsftpd start

4.关闭防火墙

service iptables stop

5.测试匿名访问

修改配置文件 vsftpd.conf

ftpusers  user_list  vsftpd.conf vsftpd_conf_migrate.sh

[[email protected] vsftpd]#vi vsftpd.conf

把配置文件里面的

# Uncomment this to allow the anonymous FTP user to uploadfiles. This only

# has an effect if the above global write enable is activated.Also, you will

# obviously need to create a directory writable by the FTP user.

#anon_upload_enable=YES

#

# Uncomment this if you want the anonymous FTP user to be ableto create

# new directories.

#anon_mkdir_write_enable=YES

#号给掉

然后保存重启服务

6.添加用户测试

useradd -m -d /home/test -s/bin/sh -g root test

passwd test 123456

useradd [-u uid  | -g group] | -d dir | -s shell | -c comment | -m [-k skel_dir] ] login说明:u指定用户ID号g制定所在组d指定用户目录s制定用户SHELL

c用户的注释m建立用户目录login用户的登录名

useradd参数有必要看一下

重启服务测试登录报错

500 OOPS: cannot change directory:/home/test

修改/home/权限

chomd 777 /home/依旧是此错误

查看资料修改selinux

[[email protected] ~]# cat /etc/selinux/config

# This file controls the state of SELinux on thesystem.

# SELINUX= can take one of these three values:

#     enforcing- SELinux security policy is enforced.

#     permissive- SELinux prints warnings instead of enforcing.

#     disabled -No SELinux policy is loaded.

SELINUX=enforcing

# SELINUXTYPE=can take one of these two values:

#     targeted -Targeted processes are protected,

#     mls -Multi Level Security protection.

SELINUXTYPE=targeted

selinxu=enforcing   改成  selinux=disabled

然后必须重启服务器

测试

a57e8d2236ba15f98ab0f91ffcc32f6d.png

登录用户为 test  密码为123456

测试成功!

原文:http://jiazuzhao.blog.51cto.com/1123655/1885492

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值