우분투 ftp 계정 접속에 관련해서요...

우분투 ftp 계정 접속에 관련해서요...

QA

우분투 ftp 계정 접속에 관련해서요...

본문

우분투에서 유저를 생성했습니다.

이 유저를 ftp 접속하게 해야 하는데 vsftpd 에서 옵션을 조작하더군요~


# You may restrict local users to their home directories.  See the FAQ for
# the possible risks in this before using chroot_local_user or
# chroot_list_enable below.
#chroot_local_user=YES                      [0번]
#
# 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                       [1번]
#chroot_list_enable=YES                      [2번]
# (default follows)
#chroot_list_file=/etc/vsftpd.chroot_list    [3번]


제가 알기로는  chroot_local_user=YES [1번]을 주석해제 하여 사용을 하면 해당 사용자를 루트탐색  즉, home 디렉토리 이상에 접근을 못하게 하는걸로 알고 있습니다. 또한 허용을 하고자 하는 계정유저가 있다면 위에 [2번]을 주석해제 시키고, 그 리스트 목록을 [3번]에 적는것으로 알고 있습니다.

그래서 도움말을 참고해보면 2번이랑 3번은 루트탐색을 허용할 계정을 온 시키는거니깐 필요 없는 부분인것 같고 1번만 주석해제 하면 모둔 유저가 루트 탐색이 안되어야 하는게 아닌가 싶은데요~

500 OOPS: vsftpd: refusing to run with writable root inside chroot()

그러면 이렇게 에러가 나오거든요...


1번 2번 3번을 모두 온시키고 3번에 아이디를 적어주면 접속잘 되지만 루트 계정에 해당 계정이 접속 되니깐요~

그리고 참고로 0번이랑 1번이랑의 차이가 뭔지 잘 모르겠습니다.


결론적으로 제가 하고 싶은건 계정유저는 ftp 접속이 되고 루트에 접근이 불가능하면 됩니다. 


이 질문에 댓글 쓰기 :

답변 2

보고 참고를 해서 했는데도 잘 안되네요~

 

#chroot_local_user=YES      <<<<<<<<<<<<<<<<<< 이건 먼지 모르겠습니다. 밑에꺼랑 같음......
#
# 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
chroot_list_enable=YES
# (default follows)
chroot_list_file=/etc/vsftpd.chroot_list

 

이렇게 했을경우에 vsftpd.chroot_list 에 적어준 계정만 루트이상 폴더 접근이 가능한것으로 압니다.

그리고 반대로  chroot_local_user=NO 이렇게 했을경우에는 해당 계정 아이디만 루트로 접근이 불가능한것으로 압니다.

 

이런식으로 하면 되지 않나요 ?

근데 이렇게 하면 계정 아이디로 FTP 접속시에 아래와 같은 문제가 발생하는데요~

 

500 OOPS: vsftpd: refusing to run with writable root inside chroot()  

 

hom/계정아이디/

 

퍼미션 문제인가요???  

 

사용자의 권한 문제인가요?

아니면 폴더의 권한 문제인가요? 



 

답변을 작성하시기 전에 로그인 해주세요.
전체 589
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT