vsftpd 홈 디렉토리 벗어날 수 있게 하기

vsftpd 홈 디렉토리 벗어날 수 있게 하기

1 개요[ | ]

  • vsftpd는 기본적으로 자신의 홈 디렉토리를 벗어나지 못하도록 설정되어 있다.
  • vsftpd.conf에서 home을 벗어날 수 있게 하고, chroot_list에 그것을 가능하도록 할 계정을 추가해준다.

2 vsftpd.conf[ | ]

vi /etc/vsftpd/vsftpd.conf
변경 전
# 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().
# chroot_list_enable=YES
# (default follows)
# chroot_list_file=/etc/vsftpd/chroot_list
chroot_local_user=YES

chroot_list_enable=YESchroot_list_file=/etc/vsftpd/chroot_list의 주석을 해제한다.

변경 후
# 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().
chroot_list_enable=YES
# (default follows)
chroot_list_file=/etc/vsftpd/chroot_list
chroot_local_user=YES

3 chroot_list[ | ]

vi /etc/vsftpd/chroot_list

chroot_list에 원하는 계정을 추가한다. (여기서는 root)

root
  • 처음에는 chroot_list가 없을 수도 있다. 그럴때는 생성하면 된다.

4 vsftpd 재시작[ | ]

[root@localhost ~]# service vsftpd restart
Shutting down vsftpd:                                      [  OK  ]
Starting vsftpd for vsftpd:                                [  OK  ]
  • 이제 클라이언트에서 ftp에 접속하면 퍼미션이 허용되는 한 어디든 갈 수 있다.

5 같이 보기[ | ]

6 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}