티스토리 뷰
FTP
사용자 제한 설정하는 방법에
/etc/vsftpd/user_list를 이용하는 방법, /etc/vsftpd/ftpusers를 이용하는 방법 두 가지가 있다.
두 가지 방법은 완전히 별개이고, 따로따로 작동한다.
각각 방법에 의해 접근이 거부되면 메시지가 다르게 뜬다.
1. user_list를 이용하는 방법
/etc/vsftpd/user_list에 계정을 등록하면 접속을 제어할 수 있다.
userlist_enable의 값과 userlist_deny값에 따라 결정된다.
userlist_enable |
userlist_deny |
의미 |
yes |
yes |
user_list에 등록된 사용자 접속 허용 안 됨 |
yes |
no |
user_list에 등록된 사용자만 접속이 허용됨 |
userlist_enable와 userlist_deny의 값은 /etc/vsftpd/vsftpd.conf에서 변경할 수 있고,
userlist_enable 값이 No가 되면 의미가 없어진다.
cat user_list
# vsftpd userlist
# If userlist_deny=NO, only allow users in this file
# If userlist_deny=YES (default), never allow users in this file, and
# do not even prompt for a password.
# Note that the default vsftpd pam config also checks /etc/vsftpd/ftpusers
# for users that are denied.
root
bin
daemon
adm
lp
sync
shutdown
halt
news
uucp
operator
games
nobody
st02
Name (192.168.10.227:root): st02
530 Permission denied.
Login failed.
Name (192.168.10.227:root): st02
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
이 파일 설정에 따라 제한 방식이 달라진다.
/etc/vsftpd/ftpusers가 목록 파일로 정의되어 있는데,
sense 설정에 따라 접근 제한 방식이 달라진다.
sense |
의미 |
deny |
ftpusers 파일에 등록된 사용자 접근 불가 |
allow |
ftpusers 파일에 등록된 사용자만 접근 가능 |
[root@apache pam.d]# cat vsftpd
#%PAM-1.0
session optional pam_keyinit.so force revoke
auth required pam_listfile.so item=user sense=deny file=/etc/vsftpd/ftpusers onerr=succeed
auth required pam_shells.so
auth include system-auth
account include system-auth
session include system-auth
session required pam_loginuid.so
저 sense 값을 조정함으로써 /etc/vsftpd/ftpusers에 등록된 계정만 접속을 허용하지 않거나, 등록된 계정만 접속하게 할 수 있다.
/etc/vsftpd/ftpusers에 st01 계정을 등록했다.
1) sense = deny일 경우
Name (192.168.10.227:root): st01
331 Please specify the password.
Password:
530 Login incorrect.
Login failed.
앞서 두 가지 접근 제한 방식은 별개이기 때문에
접근이 제한되었을 때 메시지가 다르게 뜬다고 했다.
확인해보면
user_list에 의해 접속이 거부되었을 때는
530 Permission denied.
Login failed.
'리눅스' 카테고리의 다른 글
[Unix/Linux] NFS(Network File System) (0) | 2018.04.04 |
---|---|
[Unix/Linux] 3. 다중 DNS Server 구축해보기 (1) | 2018.03.31 |
[Unix/Linux]DNS 2. CentOS에 DNS server 구축해보기 (1) | 2018.03.20 |
[Unix/Linux Server] DNS 1. DNS 이해 (1) | 2018.03.20 |
UNIX/LINUX의 파일 구조(계층 구조) (1) | 2018.03.19 |
- Total
- Today
- Yesterday
- 자바
- 파이썬기초
- JavaFX
- 오라클 null값
- Python dictionary
- 딕셔너리
- 파이썬
- WWW
- 별찍기예제
- 오라클 null값 집계함수
- 아우터조인이란
- world wide web
- 웹이란
- 파이썬 딕셔너리
- 자바글자수세기
- 오라클 집계함수
- 아우터조인
- 글자수세기프로그램
- 웹
- outer join
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |