---
title: "selinux引起的ftp故障"
author: "itspace"
date: "2011-10-18T13:11:52Z"
tags: []
categories: ["操作系统"]
slug: "selinux-ftp"
draft: false
lastmod: "2011-10-18T13:11:52Z"
id: 1199178
url: "https://dbzone.iteye.com/blog/1199178"
---

linux开通gssftp之后，客户端连接linux出现以下问题，简单记录之，备忘
D:\>ftp 10.181.75.240
Connected to 10.181.75.240.
220 sbackup FTP server (Version 5.60) ready.
User (10.181.75.240:(none)): root
331 Password required for root.
Password:
<span style="color:red">230-No directory! Logging in with home=/</span>
230 User root logged in.
<span style="color:red">ftp> cd /home
550 /home: Permission denied.</span>
ftp> cd /tmp
250 CWD command successful.

解决方法如下：
关闭selinux即可
# cat /etc/selinux/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 - SELinux is fully disabled.
SELINUX=<span style="color:red">disable</span>
# SELINUXTYPE= type of policy in use. Possible values are:
#       targeted - Only targeted network daemons are protected.
#       strict - Full SELinux protection.
SELINUXTYPE=targeted

将selinux处于permissive模式
# setenforce 0