티스토리 뷰

vsftpd.conf
0.00MB

#문제

다음은 vsftp 서버 설정에 대한 내용 이다. ( 괄호 ) 안에 알맞은 옵션을 넣으시오
[root@ihd ~]# vi /etc/vsftpd/vsftpd.conf
anonymous_enable=( ① )
local_enable=( ② )
( ③ )=120
( ④ )=YES
■ 조건
- anonymous 사용자의 접속을 제한한다.
- 로컬 사용자의 ftp 사용을 허가 한다.
- 데이터 전송 관련 타임아웃 시간은 120초 이다.
- 접속한 사용자의 홈디렉터리를 최상위 디렉터리로 지정한다.

#정답
① NO 
② YES 
③ data_connection_timeout 
④ chroot_local_user 





# vsftpd가 설치 되어있지 않음을 확인. 

root@PSDEV:/root] yum list installed | grep vsftpd
root@PSDEV:/root]


# vsftpd가 설치 되어있을땐.





# vsftpd 패키지 설치 진행.

root@PSDEV:/root] yum -y install vsftpd
Loaded plugins: fastestmirror, langpacks
base                                                                                                                                                                                                                                     | 3.6 kB  00:00:00     
extras                                                                                                                                                                                                                                   | 2.9 kB  00:00:00     
updates                                                                                                                                                                                                                                  | 2.9 kB  00:00:00     
updates/7/x86_64/primary_db                                                                                                                                                                                                              |  12 MB  00:00:00     
Loading mirror speeds from cached hostfile
 * base: mirror.kakao.com
 * extras: mirror.kakao.com
 * updates: mirror.kakao.com
Resolving Dependencies
--> Running transaction check
---> Package vsftpd.x86_64 0:3.0.2-29.el7_9 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================================================================================================================================================================================================
 Package                                                     Arch                                                        Version                                                             Repository                                                    Size
================================================================================================================================================================================================================================================================
Installing:
 vsftpd                                                      x86_64                                                      3.0.2-29.el7_9                                                      updates                                                      173 k

Transaction Summary
================================================================================================================================================================================================================================================================
Install  1 Package

Total download size: 173 k
Installed size: 353 k
Downloading packages:
vsftpd-3.0.2-29.el7_9.x86_64.rpm                                                                                                                                                                                                         | 173 kB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : vsftpd-3.0.2-29.el7_9.x86_64                                                                                                                                                                                                                 1/1 
  Verifying  : vsftpd-3.0.2-29.el7_9.x86_64                                                                                                                                                                                                                 1/1 

Installed:
  vsftpd.x86_64 0:3.0.2-29.el7_9                                                                                                                                                                                                                                

Complete!




# vsftpd.conf 내용에서 확인.

1. anonymous 사용자의 접속을 제한한다.
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=NO

2. 로컬 사용자의 ftp 사용을 허가 한다.
local_enable=YES

3. 데이터 전송 관련 타임아웃 시간은 120초 이다.
# You may change the default value for timing out a data connection.
data_connection_timeout=120

4. 접속한 사용자의 홈디렉터리를 최상위 디렉터리로 지정한다.
# You may specify an explicit list of local users to chroot() to their home
# directory. If chroot_local_user is YES, then this list becomes a list of
# users to NOT chroot().
# (Warning! chroot'ing can be very dangerous. If using chroot, make sure that
# the user does not have write access to the top level directory within the
# chroot)
chroot_local_user=YES

 

 

# vsftpd.conf 옵션 값 

anonymous_enable = yes
//익명 ftp 서비스 활성화 여부 설정

local_enable = yes 
//로컬 계정 사용자 접속 여부 설정

write_enable = yes 
//쓰기 가능 여부 설정

local_umask = 022 
//파일 퍼미션 정의(파일의 퍼미션은 644)

dirmessage_enable=yes 
//디렉토리 이동시 각 디렉토리 메시지 보여지게 할지 여부

anon_upload_enable = yes 
//익명 FTP 접속자의 파일 업로드 권한 설정 

anon_mkdir_write_enable = yes 
//익명FTP 접속자의 디렉토리 생성 권한 설정

dirmessage_enagle = yes 
//FTP접속자가 다른 디렉토리로 이동시, 알림메시지 출력여부 설정 

xferlog_enable = yes 
//FTP 접속자들의 업/다운로드 상황 로그파일 저장 여부 설정

connect_from_port_20 = yes 
//standlone 모드를 운영하면서 데이터 전송포트 사용시 설정



chown_uploads = yes

//익명 FTP 서비스에서 익명 접속사 업로드한 파일의 소유권 자동 변경 설정 



chown_username = whoever

//익명 FTP 서비스에서 익명 접속자가 업로드한 파일의 소유권 자동 변경한 후, 그 소유권을 변경할 사용자 설정 (root로 설정하지 말고)



xferlog_file=/var/log/xferlog

//로그파일 경로 설정



xferlog_std_format = yes

//로그파일 포맷 설정



idle_session_timeout = 600

//idle 상태에서 접속을 유지할 최대 시간 설정(기본값 300초)



data_connection_timeout = 120

//파일 업/다운로드시 연결을 유지하는 시간 설정(기본값 300초)



nopriv_user=missflash

//익명 FTP 접속자가 접속하는데 사용할 사용자 설정 (기본값 nobody)



async_abor_eanble = yes

//async ABOR명령 가능 여부 설정(기본설정 NO)



acscii_upload_enable = yes

//ASCII 파일 업로드 가능 여부 설정(기본값NO)



ascii_download_enable = yes

//ASCII 파일 다운로드 가능 여부 설정(기본값 NO)



ftpd_banner=welcome

//FTP 접속자에게 보여줄 환영 메시지 설정 



deny_email_enable = yes

//익명 FTP접속시 접속을 거부할 이메일 설정(기본값)



banned_email_file=/etc/vsftpd/banned_emails

//접속을 거부할 이메일의 파일 경로 설정



chroot_local_user = yes

//홈 디렉토리 위로 이동 제한 여부 설정(기본값 NO)



chroot_list_enable = yes

//chroot에서 제외할 사용자 목록파일 사용 여부 설정(기본값 NO)



chroot_list_file=/etc/vsftpd/chroot_list

//chroot에서 제외할 사용자 목록 파일과 경로 설정



ls_recurese_enable = yes

// FTP 접속자들의 ls -R 명령어 사용가능 여부 설정 기본값 no)



listen = yes

//standlone모드로 서비스할때 설정 (기본값 xinetd)



pam_service_name=vsftpd

//pam 인증에 사용할 설정파일의 이름 설정



userlist_enable = yes

//userlist 에 있는 계정 접속 허용 



tcp_wrappers = yes 

//tcp_wrapper의 접근제어를 받도록 설정한다.



listen_port=6590 

//vsftpd 접속포트
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/05   »
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