今天有台机器由于hang住了进行重启,重启之后发现ftp不好使,开始以为是ftp服务不随机器一起启动,结果就 重启了下。不过问题还是没解决,依然不好使,报500 OOPS: cannot change directory 这个错误。铜鼓半天,才发现由于selinux原因。
先输入/usr/sbin/getenforce
如果是Enforcing,则表示有问题
进入到/etc/selinu/下。查看config文件,发现
# This file controls the state of SELinux on the system.
# 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
SELINUX=disabled
更改之后,由于暂时不能重启机器,就用setenforce 0 让它暂时生效。
后来仔细查百度才知道
本文探讨了一台机器重启后FTP服务无法正常使用的原因,并深入分析了SELinux配置错误导致的500OOPS:cannotchangedirectory错误。通过修改SELinux配置文件和临时设置,最终解决了问题。文章详细解释了SELinux的三种状态:disabled、permissive和enforcing,以及SELINUXTYPE的作用,特别强调了permissive模式在开发策略时的实用性。

1805

被折叠的 条评论
为什么被折叠?



