# Centos7(vsftp 3.x) chroot적용하기

<table border="1" id="bkmrk-perplexity%EC%97%90%EC%84%9C-%EC%83%9D%EC%84%B1%ED%95%9C-ai%EC%9D%B4" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 99.881%;"></col></colgroup><tbody><tr><td>[![image.png](http://igoni.kr/uploads/images/gallery/2026-02/scaled-1680-/xNlimage.png)](http://igoni.kr/uploads/images/gallery/2026-02/xNlimage.png)

</td></tr><tr><td class="align-right">perplexity에서 생성한 AI이미지</td></tr></tbody></table>

Centos7에서 vsftp 구성할때, 일반 사용자가 홈디렉토리 상단으로 올라오지 못하게 하는 chroot 옵션만 넣으면 FTP접근이 안됨.

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

```shell
$> vi /etc/vsftpd/vsftpd.conf
...
chroot_loca_user=YES
...
```

보통 이렇게만 설정하는데, Centos7(VSFTP 3.x)에서는 저렇게만 하면 접속이 안된다.

[![image-1654587303751.png](http://igoni.kr/uploads/images/gallery/2022-06/scaled-1680-/image-1654587303751.png)](http://igoni.kr/uploads/images/gallery/2022-06/image-1654587303751.png)

이런 메시지를 보게 될 것이야…;;

그래서 한줄 더 넣어줘야 한다. chroot가 적용된 사용자만 쓰기권한부여 하는 옵션..

```shell
$> vi /etc/vsftpd/vsftpd.conf
...
allow_writeable_chroot=YES
...
```

그리고 나서 서비스 재시작 하면 원하는 파일리스트가 잘 나온다~ 짜잔~~

```shell
$> systemctl restart vsftpd.service
```