반응형
http://anti1346.egloos.com/4547881

[root@scbyun-ns1 cheol]# ftp 127.0.0.1
Connected to 127.0.0.1.
220 (vsFTPd 2.0.5)
530 Please login with USER and PASS.
530 Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
Name (127.0.0.1:root): cheol
331 Please specify the password.
Password:
500 OOPS: cannot change directory:/home/cheol
Login failed.
ftp>


[root@scbyun-ns1 cheol]# setsebool -P ftp_home_dir 1
[root@scbyun-ns1 cheol]# ftp 127.0.0.1
Connected to 127.0.0.1.
220 (vsFTPd 2.0.5)
530 Please login with USER and PASS.
530 Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
Name (127.0.0.1:root): cheol
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> bi
200 Switching to Binary mode.
ftp> ha
Hash mark printing on (1024 bytes/hash mark).
ftp>

SELlinux 설정이 되어 있을 경우에 vsftpd 설치 후 클라이언트에서 접속 시 위와 같은 오류가 발생합니다.

linux 설치 시 SELlinux 로 설정이되어 있다면 디폴트로 사용자의 HOME 디렉토리에 쓰기를 제한하고 있습니다.

이럴 경우 SELlinux 설정에서 FTP 부분을 변경하면 됩니다.

setsebool 을 이용하여 FTP 접속 시 디렉토리 접근을 할 수 있도록 변경합니다.
# setsebool -P ftp_home_dir 1

(설명)
-- P 옵션은 Rebooting 되더라도 값을 저장하여, 정상적으로 동작하도록 합니다.
-- 1 은 true

FTP 에 관하여 SELinux 정책을 적용하지 해제 명령어
# setsebool -P ftp_disable_trans 1
반응형

+ Recent posts