{"id":13,"date":"2016-03-21T06:15:37","date_gmt":"2016-03-21T06:15:37","guid":{"rendered":"http:\/\/120.27.50.22\/wordpress\/?p=13"},"modified":"2016-03-21T06:15:37","modified_gmt":"2016-03-21T06:15:37","slug":"centos7%e5%ae%89%e8%a3%85%e8%ae%be%e7%bd%aeftp","status":"publish","type":"post","link":"http:\/\/www.homconnect.cn\/?p=13","title":{"rendered":"CentOS7\u5b89\u88c5\u8bbe\u7f6eFTP"},"content":{"rendered":"<h2>\u4e00\uff0e\u5b89\u88c5FTP<\/h2>\n<h3>1.\u68c0\u6d4b\u662f\u5426\u5b89\u88c5\u4e86FTP:<\/h3>\n<blockquote><p>[root@localhost ~]# rpm -q vsftpd<br \/>\n\u5982\u679c\u5b89\u88c5\u4e86\u4f1a\u663e\u793a\u7248\u672c\u4fe1\u606f:<br \/>\n[root@localhost ~]# vsftpd-2.0.5-16.el5_5.1<br \/>\n\u5426\u5219\u663e\u793a:<br \/>\n[root@localhost ~]# package vsftpd is not installed<\/p><\/blockquote>\n<h3>2. \u5b89\u88c5FTP<\/h3>\n<blockquote><p>[root@localhost ~]# yum install vsftpd<\/p><\/blockquote>\n<h4>2.1 \u5b8c\u6210FTP\u5b89\u88c5\u540e\uff0c\u5c06\/ETC\/VSFTPD\/USER_LIST\u6587\u4ef6\u548c\/ETC\/VSFTPD\/FTPUSERS\u6587\u4ef6\u4e2d\u7684ROOT\u8fd9\u4e00\u884c\u7528#\u6ce8\u91ca\u6389<\/h4>\n<blockquote><p># root<\/p><\/blockquote>\n<h4>2.2 \u6267\u884c\u4ee5\u4e0b\u547d\u4ee4<\/h4>\n<blockquote><p>#setsebool -P ftpd_disable_trans=1<br \/>\n\u4fee\u6539\/etc\/vsftpd\/vsftpd.conf,\u5728\u6700\u540e\u4e00\u884c\u5904\u6dfb\u52a0local_root=\/<\/p><\/blockquote>\n<h4>2.3 \u91cd\u542fFTP\u8fdb\u7a0b<\/h4>\n<blockquote><p>#service vsftpd restart<br \/>\n**\u6ce8\uff1a\u6bcf\u6b21\u4fee\u6539\u8fc7ftp\u76f8\u5173\u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u90fd\u9700\u8981\u91cd\u542fftp\u8fdb\u7a0b\u6765\u751f\u6548\u3002 ftp\u670d\u52a1\u5668\u5c31\u53ef\u4ee5\u4f7f\u7528\u4e86\u3002**<\/p><\/blockquote>\n<h2>\u4e8c. \u914d\u7f6eFTP<\/h2>\n<h3>1.\u521b\u5efa\u4e00\u4e2a\u8d26\u53f7\u4e3atest\u7684\u8d26\u6237\uff1a<\/h3>\n<blockquote><p>#mkdir \/tmp\/test \/\/\u9996\u5148\u521b\u5efa\u597d\u76ee\u5f55<br \/>\n#adduser -d \/tmp\/test -g ftp -s \/sbin\/nologin test<br \/>\n\/\/-s \/sbin\/nologin\u662f\u8ba9\u5176\u4e0d\u80fd\u767b\u9646\u7cfb\u7edf\uff0c-d\u662f\u6307\u5b9a\u7528\u6237\u76ee\u5f55\u4e3a\/opt\/srsman\uff0c\u5373\u8be5\u8d26\u6237\u53ea\u80fd\u767b\u9646ftp\uff0c\u5374\u4e0d\u80fd\u7528\u505a\u767b\u9646\u7cfb\u7edf\u7528\u3002<\/p><\/blockquote>\n<h4>1.1 \u4e3aTEST\u8bbe\u7f6e\u5bc6\u7801<\/h4>\n<blockquote><p>#passwd test<br \/>\nChanging password for user beinan.\/\/\u63a5\u4e0b\u6765\u4f1a\u51fa\u73b0\u8ba9\u4f60\u8bbe\u7f6e\u65b0\u7684\u5bc6\u7801<br \/>\nNew password:<br \/>\nRetype new password:<br \/>\npasswd: all authentication tokens updated successfully<\/p><\/blockquote>\n<h3>2. \u9650\u5236\u7528\u6237\u76ee\u5f55\uff0c\u4e0d\u5f97\u6539\u53d8\u76ee\u5f55\u5230\u4e0a\u7ea7<\/h3>\n<h4>2.1 \u4fee\u6539\/ETC\/VSFTPD\/VSFTPD.CONF<\/h4>\n<blockquote><p>\u5c06\u8fd9\u4e24\u884c<br \/>\n#chroot_list_enable=YES<br \/>\n#chroot_list_file=\/etc\/vsftpd.chroot_list<br \/>\n\u6ce8\u91ca\u53bb\u6389<br \/>\nchroot_list_enable=YES<br \/>\nchroot_list_file=\/etc\/vsftpd\/chroot_list<\/p><\/blockquote>\n<h4>2.2 \u65b0\u589e\u4e00\u4e2a\u6587\u4ef6: \/ETC\/VSFTPD\/CHROOT_LIST<\/h4>\n<blockquote><p>\u5185\u5bb9\u5199\u9700\u8981\u9650\u5236\u7684\u7528\u6237\u540d\uff1a<br \/>\ntest<br \/>\n\u91cd\u65b0\u542f\u52a8vsftpd<br \/>\n#service vsftpd restart<\/p><\/blockquote>\n<h3>3. \u8bbe\u7f6e\u5f00\u673a\u542f\u52a8<\/h3>\n<p>(1)\u627e\u5230\/etc\/rc.local\u6587\u4ef6<br \/>\n(2)\u6253\u5f00\u8be5\u6587\u4ef6\uff0c\u5728\u6700\u540e\u4e00\u884c\u6dfb\u52a0\uff1aservice vsftpd start<br \/>\n(3)\u4fdd\u5b58\uff0c\u9000\u51fa<\/p>\n<h3>4. \u7528FTP\u5ba2\u6237\u7aef\u5feb\u901f\u8fde\u63a5<\/h3>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\uff0e\u5b89\u88c5FTP 1.\u68c0\u6d4b\u662f\u5426\u5b89\u88c5\u4e86FTP: [root@localhost ~]# rpm -q vsftpd &hellip; <a href=\"http:\/\/www.homconnect.cn\/?p=13\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u201cCentOS7\u5b89\u88c5\u8bbe\u7f6eFTP\u201d<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[12,6],"_links":{"self":[{"href":"http:\/\/www.homconnect.cn\/index.php?rest_route=\/wp\/v2\/posts\/13"}],"collection":[{"href":"http:\/\/www.homconnect.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.homconnect.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.homconnect.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.homconnect.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=13"}],"version-history":[{"count":1,"href":"http:\/\/www.homconnect.cn\/index.php?rest_route=\/wp\/v2\/posts\/13\/revisions"}],"predecessor-version":[{"id":14,"href":"http:\/\/www.homconnect.cn\/index.php?rest_route=\/wp\/v2\/posts\/13\/revisions\/14"}],"wp:attachment":[{"href":"http:\/\/www.homconnect.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=13"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.homconnect.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=13"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.homconnect.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=13"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}