{"id":189,"date":"2021-01-21T18:01:37","date_gmt":"2021-01-21T09:01:37","guid":{"rendered":"https:\/\/centos.ihavenomoney.co.kr\/?page_id=189"},"modified":"2025-03-26T11:05:16","modified_gmt":"2025-03-26T02:05:16","slug":"ftp-vsftpd-%ec%84%a4%ec%b9%98","status":"publish","type":"page","link":"https:\/\/centos.ihavenomoney.co.kr\/?page_id=189","title":{"rendered":"ftp (vsftpd) \uc124\uce58"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">ftp (vsftpd) \uc124\uce58<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Remark:<\/h3>\n\n\n\n<p>CentOS \uc5d0 ftp (vsftpd) \ub97c \uc124\uce58 \ud558\uace0 fileziller \ub85c \ud30c\uc77c\uc744 \uacc4\uc815\ud3f4\ub354\uc5d0 \uc62c\ub824 \ubcf4\uc790.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. nologin\uc758 \uc808\ub300\uacbd\ub85c\ub97c which \uba85\ub839\uc5b4\ub85c \ucc3e\ub294\ub2e4.<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\"># which nologin\n\/usr\/sbin\/nologin\n<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">2. vi \uba85\ub839\uc5b4\ub85c \/etc\/shells \ud30c\uc77c\uc744 \uc5f4\uc5b4 \uc81c\uc77c \uc544\ub798 \uc904\uc5d0 \/usr\/sbin\/nologin\uc744 \ucd94\uac00<\/h3>\n\n\n\n<h3 class=\"wp-block-heading\">\uc801\uc6a9\ud6c4 \uc7ac\ubd80\ud305<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">#vi \/etc\/shells\n# \/etc\/shells: valid login shells\n\/bin\/sh\n\/bin\/dash\n\/bin\/bash\n\/bin\/rbash\n\/usr\/bin\/rc\n\n\/usr\/sbin\/nologin\n<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">3. Install VSFTPD<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\"># sudo yum install vsftpd<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">4. launch when the system boots<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\"># sudo systemctl start vsftpd\n# sudo systemctl enable vsftpd\n<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">5. firewall to allow FTP traffic on Port 21<\/h3>\n\n\n\n<p>* firewall : tcp 21 open&nbsp; or * iptables : tcp 21 open<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">6. configuration<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\"># sudo vi \/etc\/vsftpd\/vsftpd.conf\n<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">anonymous_enable=NO\nlocal_enable=YES\nwrite_enable=YES\nlocal_umask=022\ndirmessage_enable=YES\nxferlog_enable=YES\nconnect_from_port_20=YES\nxferlog_file=\/var\/log\/xferlog\nxferlog_std_format=YES\n \nchroot_local_user=YES\n \n#tcp setting  \nlisten=YES \n#listen_ipv6=YES \n \nrsa_cert_file=\/etc\/ssl\/certs\/vsftpd.pem\npam_service_name=vsftpd\n \nuserlist_enable=YES  #\ub85c\uadf8\uc778 \uc81c\ud55c\uac78\uae30 \ntcp_wrappers=YES\n \n# Add\nforce_dot_files=YES\nhide_ids=YES\nmax_per_ip=10\nmax_clients=20\nallow_writeable_chroot=YES<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">6.1 tcp6 setting (:::21)<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\"># netstat -tnlp\nActive Internet connections (only servers)\nProto Recv-Q Send-Q Local Address           Foreign Address         State       PID\/Program name\ntcp        0      0 0.0.0.0:25069           0.0.0.0:*               LISTEN      1660\/sshd\ntcp6       0      0 :::21                   :::*                    LISTEN      27564\/vsftpd\ntcp6       0      0 :::25069                :::*                    LISTEN      1660\/sshd\ntcp6       0      0 ::1:631                 :::*                    LISTEN      1655\/cupsd\ntcp6       0      0 ::1:25                  :::*                    LISTEN      2292\/master\ntcp6       0      0 :::5051                 :::*                    LISTEN      1778\/zagent\ntcp6       0      0 :::33060                :::*                    LISTEN      20219\/mysqld<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">6.2 tcp setting&nbsp; (0.0.0.0:21 )<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\"># netstat -tnlp\nActive Internet connections (only servers)\nProto Recv-Q Send-Q Local Address           Foreign Address         State       PID\/Program name\ntcp        0      0 0.0.0.0:25069           0.0.0.0:*               LISTEN      1660\/sshd\ntcp        0      0 0.0.0.0:21              0.0.0.0:*               LISTEN      27564\/vsftpd\ntcp6       0      0 :::25069                :::*                    LISTEN      1660\/sshd\ntcp6       0      0 ::1:631                 :::*                    LISTEN      1655\/cupsd\ntcp6       0      0 ::1:25                  :::*                    LISTEN      2292\/master\ntcp6       0      0 :::5051                 :::*                    LISTEN      1778\/zagent\ntcp6       0      0 :::33060                :::*                    LISTEN      20219\/mysqld\n<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">7. Apply the above settings<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\"># systemctl restart vsftpd\n<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">8. vsftpd status<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\"># service vsftpd status\n\nRedirecting to \/bin\/systemctl status vsftpd.service\n\u25cf vsftpd.service - Vsftpd ftp daemon\n   Loaded: loaded (\/usr\/lib\/systemd\/system\/vsftpd.service; enabled; vendor preset: disabled)\n   Active: active (running) since \ud654 2021-01-19 16:35:25 KST; 2 days ago\n Main PID: 6369 (vsftpd)\n    Tasks: 1\n   CGroup: \/system.slice\/vsftpd.service\n           \u2514\u25006369 \/usr\/sbin\/vsftpd \/etc\/vsftpd\/vsftpd.conf\n<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><\/h3>\n\n\n\n<h3 class=\"wp-block-heading\">Next : <a href=\"https:\/\/centos.ihavenomoney.co.kr\/?page_id=192\">ftp (vsftpd) \uacc4\uc815 \ucd94\uac00<\/a><\/h3>\n\n\n\n<h3 class=\"wp-block-heading\">\uc138\ud305 \uc124\uba85<\/h3>\n\n\n\n<p>pam_service_name \uc635\uc158\uc740 vsftpd\uac00 PAM(Pluggable Authentication Modules)\uc744 \uc0ac\uc6a9\ud558\uc5ec \uc0ac\uc6a9\uc790 \uc778\uc99d\uc744 \uc218\ud589\ud560 \ub54c, \uc5b4\ub5a4 PAM \uc124\uc815 \ud30c\uc77c\uc744 \ucc38\uc870\ud560\uc9c0\ub97c \uc9c0\uc815\ud558\ub294 \uc5ed\ud560\uc744 \ud569\ub2c8\ub2e4. \uae30\ubcf8\uc801\uc73c\ub85c vsftpd\ub294 \/etc\/pam.d\/vsftpd \ud30c\uc77c\uc744 \uc0ac\uc6a9\ud558\ub3c4\ub85d \uc124\uc815\ub418\uc5b4 \uc788\uc9c0\ub9cc, pam_service_name \uac12\uc744 vsfptd\ub85c \ubcc0\uacbd\ud558\uba74 \/etc\/pam.d\/vsfptd \ud30c\uc77c\uc744 \ucc3e\uc544\uc11c \ud574\ub2f9 \ud30c\uc77c\uc5d0 \uc815\uc758\ub41c \uc778\uc99d \ubaa8\ub4c8 \uc124\uc815\uc744 \uc801\uc6a9\ud558\uac8c \ub429\ub2c8\ub2e4.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\uae30\ubcf8 \ub3d9\uc791:<\/strong> \uae30\ubcf8\uac12\uc740 \u201cvsftpd\u201d\ub85c \uc124\uc815\ub418\uc5b4 \uc788\uc5b4 \/etc\/pam.d\/vsftpd \ud30c\uc77c\uc744 \uc0ac\uc6a9\ud569\ub2c8\ub2e4.<\/li>\n\n\n\n<li><strong>\ubcc0\uacbd \uc2dc:<\/strong> pam_service_name\uc744 \u201cvsfptd\u201d \ub4f1\uc73c\ub85c \ubcc0\uacbd\ud558\uba74, vsftpd\ub294 \/etc\/pam.d\/vsfptd \ud30c\uc77c\uc744 \ucc3e\uac8c \ub429\ub2c8\ub2e4. \uc774 \ud30c\uc77c\uc774 \uc62c\ubc14\ub974\uac8c \uad6c\uc131\ub418\uc5b4 \uc788\uc5b4\uc57c \uc815\uc0c1\uc801\uc73c\ub85c \uc778\uc99d\uc774 \uc774\ub8e8\uc5b4\uc9d1\ub2c8\ub2e4.<\/li>\n<\/ul>\n\n\n\n<p>\uc774 \uc124\uc815\uc740 \uc0ac\uc6a9\uc790 \uc778\uc99d \uacfc\uc815\uc744 \uc138\ubc00\ud558\uac8c \uc81c\uc5b4\ud560 \uc218 \uc788\ub3c4\ub85d \ud558\uba70, \uc608\ub97c \ub4e4\uc5b4, \ud2b9\uc815 \uc778\uc99d \ubc29\uc2dd\uc774\ub098 \ucd94\uac00\uc801\uc778 \ubcf4\uc548 \uc124\uc815\uc744 \uc801\uc6a9\ud558\uace0\uc790 \ud560 \ub54c \uc720\uc6a9\ud569\ub2c8\ub2e4.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>ftp (vsftpd) \uc124\uce58 Remark: CentOS \uc5d0 ftp (vsftpd) \ub97c \uc124\uce58 \ud558\uace0 fileziller \ub85c \ud30c\uc77c\uc744 \uacc4\uc815\ud3f4\ub354\uc5d0 \uc62c\ub824 \ubcf4\uc790. 1. nologin\uc758 \uc808\ub300\uacbd\ub85c\ub97c which \uba85\ub839\uc5b4\ub85c \ucc3e\ub294\ub2e4. # which nologin \/usr\/sbin\/nologin 2. vi \uba85\ub839\uc5b4\ub85c \/etc\/shells \ud30c\uc77c\uc744 \uc5f4\uc5b4 \uc81c\uc77c \uc544\ub798 \uc904\uc5d0 \/usr\/sbin\/nologin\uc744 \ucd94\uac00 \uc801\uc6a9\ud6c4 \uc7ac\ubd80\ud305 #vi \/etc\/shells # \/etc\/shells: valid login shells \/bin\/sh \/bin\/dash \/bin\/bash \/bin\/rbash \/usr\/bin\/rc \/usr\/sbin\/nologin 3. Install &hellip;<br \/><a href=\"https:\/\/centos.ihavenomoney.co.kr\/?page_id=189\" class=\"more-link pen_button pen_element_default pen_icon_arrow_double\"><span class=\"screen-reader-text\">ftp (vsftpd) \uc124\uce58<\/span> \ub354\ubcf4\uae30<\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-189","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/centos.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/pages\/189","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/centos.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/centos.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/centos.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/centos.ihavenomoney.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=189"}],"version-history":[{"count":20,"href":"https:\/\/centos.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/pages\/189\/revisions"}],"predecessor-version":[{"id":642,"href":"https:\/\/centos.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/pages\/189\/revisions\/642"}],"wp:attachment":[{"href":"https:\/\/centos.ihavenomoney.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=189"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}