centos yum安装ftp 及解决vsftp错误500 OOPS: cannot change directory:/home/**
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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
[[email protected] vsftpd]# ls
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
[[email protected] ~]#
selinxu=enforcing 改成 selinux=disabled
然后必须重启服务器
测试
登录用户为 test 密码为123456
测试成功!
本文出自 “tigase安装与测试” 博客,请务必保留此出处http://jiazuzhao.blog.51cto.com/1123655/1885492
以上是关于centos yum安装ftp 及解决vsftp错误500 OOPS: cannot change directory:/home/**的主要内容,如果未能解决你的问题,请参考以下文章