{"id":113,"date":"2018-09-07T10:42:12","date_gmt":"2018-09-07T07:42:12","guid":{"rendered":"https:\/\/blog.airmeno.ru\/?p=113"},"modified":"2019-09-05T17:43:16","modified_gmt":"2019-09-05T14:43:16","slug":"nastrojka-ftp-servera-vsftpd-na-linux-debian","status":"publish","type":"post","link":"https:\/\/blog.airmeno.ru\/?p=113","title":{"rendered":"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 FTP \u0441\u0435\u0440\u0432\u0435\u0440\u0430 (vsFTPd) \u043d\u0430 Linux Debian"},"content":{"rendered":"\n<p>FTP, \u043f\u0440\u0438 \u0432\u0441\u0435\u043c \u0441\u0432\u043e\u0435\u043c \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0435, \u043f\u043e\u043a\u0430 \u043d\u0435 \u043e\u0442\u0445\u043e\u0434\u0438\u0442 \u043d\u0430 \u0432\u0442\u043e\u0440\u043e\u0439 \u043f\u043b\u0430\u043d. \u041e\u043d \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u0435\u043d \u0438 \u043d\u0443\u0436\u0435\u043d. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0412\u0435\u0431 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0431\u044b\u0441\u0442\u0440\u043e \u043d\u0430 Debian 9 (LAMP) \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u043f\u043e\u0434\u043d\u044f\u0442\u0438\u0435 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u0431\u044b\u043b\u043e \u0431\u044b \u043d\u0435 \u043f\u043e\u043b\u043d\u044b\u043c, \u0435\u0441\u043b\u0438 \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 \u0431\u044b FTP \u043d\u0430 \u043d\u0430\u0448 \u0441\u0435\u0440\u0432\u0435\u0440.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>\u041e\u0431\u044b\u0447\u043d\u043e \u043c\u043e\u0439 \u0432\u044b\u0431\u043e\u0440 \u043f\u0430\u0434\u0430\u0435\u0442 \u043d\u0430 ProFTPd \u0441 \u0435\u0433\u043e \u0431\u043e\u0433\u0430\u0442\u044b\u043c\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438, \u043e\u0434\u043d\u0430\u043a\u043e, \u0441\u0435\u0439\u0447\u0430\u0441 \u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u043e\u0439 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u043e\u0439 vsFTPd.<\/p>\n\n\n\n<p>\u0418\u0442\u0430\u043a, \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c vsFTPd \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 root (su)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt-get install vsftpd<\/code><\/pre>\n\n\n\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nano \/etc\/vsftpd.conf<\/code><\/pre>\n\n\n\n<p>\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u0440\u043e\u0447\u043a\u0438:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>write_enable=YES #\u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u0437\u0430\u043f\u0438\u0441\u044c\nascii_upload_enable=YES\nascii_download_enable=YES\nftpd_banner=Welcome to My FTP service #\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0441\u0432\u043e\u0439 \u0431\u0430\u043d\u043d\u0435\u0440 \u043d\u0430 \u0432\u0445\u043e\u0434\nchroot_local_user=YES # \u0417\u0430\u043f\u0438\u0440\u0430\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0432 \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0445 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u0445, \u0435\u0441\u043b\u0438 \u043d\u0435 \u0445\u043e\u0442\u0438\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u043b\u0438 \u0432\u0438\u0434\u0435\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043f\u0430\u043f\u043e\u043a \u0438 \u0444\u0430\u0439\u043b\u043e\u0432 \u0432\u043d\u0435 \u0441\u0432\u043e\u0438\u0445 \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0445 \u043f\u0430\u043f\u043e\u043a.\nallow_writeable_chroot=YES \nlocal_enable=YES #\u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u0432\u0445\u043e\u0434 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\nanonymous_enable=NO #\u0417\u0430\u043f\u0440\u0435\u0449\u0430\u0435\u043c \u0430\u043d\u043e\u043d\u0438\u043c\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \npasv_min_port=50000\npasv_max_port=60000 #\u0420\u0430\u0431\u043e\u0442\u0430 \u0432 \u043f\u0430\u0441\u0441\u0438\u0432\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435. <\/code><\/pre>\n\n\n\n<p> \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043f\u0440\u043e<a href=\"https:\/\/peterhost.ru\/wiki\/%D0%90%D0%BA%D1%82%D0%B8%D0%B2%D0%BD%D1%8B%D0%B9-%D0%B8-%D0%BF%D0%B0%D1%81%D1%81%D0%B8%D0%B2%D0%BD%D1%8B%D0%B9-%D1%80%D0%B5%D0%B6%D0%B8%D0%BC-%D1%80%D0%B0%D0%B1%D0%BE%D1%82%D1%8B-FTP\"> \u0440\u0435\u0436\u0438\u043c\u044b \u0440\u0430\u0431\u043e\u0442\u044b FTP<\/a><\/p>\n\n\n\n<p>\u0414\u0430\u043b\u0435\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 FTP. \u041e\u0434\u043d\u0430\u043a\u043e, \u0437\u0430\u043f\u0440\u0435\u0449\u0430\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u043a shell, \u0442.\u0435. \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043b\u043e\u0433\u0438\u043d\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>useradd username -b \/home -m -U -s \/bin\/false<\/code><\/pre>\n\n\n\n<p>\u0413\u0434\u0435:<br>\nusername &#8212; \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f(\u043b\u043e\u0433\u0438\u043d)<br>\nhome &#8212; \u0414\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u0433\u0434\u0435 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0435\u0433\u043e \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433<br>\n-m \u2014 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u044b\u043b\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u0432 username.<br>\n-U &#8212; \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u043e\u0434\u043d\u043e\u0438\u043c\u0435\u043d\u043d\u0443\u044e \u0433\u0440\u0443\u043f\u043f\u0443.<br>\n-s \/bin\/false &#8212; \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d shell, \u041d\u041e! \u0415\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c shell, \u0442\u043e \u043e\u043d \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043b\u043e\u0433\u0438\u043d\u0438\u0442\u044c\u0441\u044f \u043d\u0430 FTP \u0441\u0435\u0440\u0432\u0435\u0440.<\/p>\n\n\n\n<p>\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b \/etc\/pam.d\/vsftpd<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nano \/etc\/pam.d\/vsftpd<\/code><\/pre>\n\n\n\n<p>\u041d\u0430\u0439\u0442\u0438 \u0438 \u0437\u0430\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>auth   required        pam_shells.so<\/code><\/pre>\n\n\n\n<p>\u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u0430 \u0442\u0430\u043a:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#auth   required        pam_shells.so<\/code><\/pre>\n\n\n\n<p>\u0412\u0441\u0435! \u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c vsFTPd<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/etc\/init.d\/vsftpd restart<\/code><\/pre>\n\n\n\n<p>\u0413\u043e\u0442\u043e\u0432\u043e!<\/p>\n\n\n\n<p><strong>\u0414\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435:<\/strong><\/p>\n\n\n\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0432\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u0442\u044c \u043a \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0433\u0434\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u0430\u0439\u0442 \u043d\u0430 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0435.<br>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>adduser --home \/var\/www --shell \/bin\/false --ingroup ftp USERNAME<\/code><\/pre>\n\n\n\n<p>&#8212;home \/var\/www \u2014 \u0437\u0430\u0434\u0430\u0442\u044c home \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e ( \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \/var\/www\/siteFolder &#8212; \u044d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c \u043f\u0430\u043f\u043a\u0430 \u0433\u0434\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u0430\u0439\u0442)<br>\n&#8212;shell \/bin\/false \u2014 \u0435\u0441\u043b\u0438 \u0437\u0430\u043f\u0440\u0435\u0442\u0438\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 shell<br>\n&#8212;ingroup ftp \u2014 \u043f\u043e\u0441\u0435\u043b\u0438\u0442\u044c \u044e\u0437\u0435\u0440\u0430 \u0432 \u0433\u0440\u0443\u043f\u043f\u0443 (\u0435\u0441\u043b\u0438 \u043d\u0435 \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043b\u043e\u0434\u0438\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0433\u0440\u0443\u043f\u043f \u0434\u043b\u044f \u0442\u0430\u043a\u0438\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>FTP, \u043f\u0440\u0438 \u0432\u0441\u0435\u043c \u0441\u0432\u043e\u0435\u043c \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0435, \u043f\u043e\u043a\u0430 \u043d\u0435 \u043e\u0442\u0445\u043e\u0434\u0438\u0442 \u043d\u0430 \u0432\u0442\u043e\u0440\u043e\u0439 \u043f\u043b\u0430\u043d. \u041e\u043d \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u0435\u043d \u0438 \u043d\u0443\u0436\u0435\u043d. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0412\u0435\u0431 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0431\u044b\u0441\u0442\u0440\u043e \u043d\u0430 Debian 9 (LAMP)&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[4,5],"tags":[12,51,50],"_links":{"self":[{"href":"https:\/\/blog.airmeno.ru\/index.php?rest_route=\/wp\/v2\/posts\/113"}],"collection":[{"href":"https:\/\/blog.airmeno.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.airmeno.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.airmeno.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.airmeno.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=113"}],"version-history":[{"count":4,"href":"https:\/\/blog.airmeno.ru\/index.php?rest_route=\/wp\/v2\/posts\/113\/revisions"}],"predecessor-version":[{"id":771,"href":"https:\/\/blog.airmeno.ru\/index.php?rest_route=\/wp\/v2\/posts\/113\/revisions\/771"}],"wp:attachment":[{"href":"https:\/\/blog.airmeno.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=113"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.airmeno.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=113"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.airmeno.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}