{"id":8074,"date":"2024-06-24T16:01:01","date_gmt":"2024-06-24T08:01:01","guid":{"rendered":""},"modified":"2024-06-24T16:01:01","modified_gmt":"2024-06-24T08:01:01","slug":"ubuntu\u642d\u5efaftp\u670d\u52a1\u5668\u7684\u6b65\u9aa4_ubuntu ftp\u547d\u4ee4","status":"publish","type":"post","link":"https:\/\/mushiming.com\/8074.html","title":{"rendered":"ubuntu\u642d\u5efaftp\u670d\u52a1\u5668\u7684\u6b65\u9aa4_ubuntu ftp\u547d\u4ee4"},"content":{"rendered":"

Ubuntu20.04\u642d\u5efaFTP\u6587\u4ef6\u7cfb\u7edf - \u674e\u4e1c\u9633 - \u535a\u5ba2\u56ed<\/p>\n

Ubuntu20.04\u642d\u5efaFTP\u6587\u4ef6\u7cfb\u7edf<\/p>\n

1. \u66f4\u65b0\u6e90<\/p>\n

sudo apt-get update <\/code><\/pre>\n

2. \u547d\u4ee4\u5b89\u88c5vsftp<\/p>\n

\u901a\u8fc7apt-get\u5b89\u88c5ftp\u670d\u52a1<\/p>\n

sudo apt-get install vsftpd <\/code><\/pre>\n

3.\u8bbe\u7f6e\u8bbf\u95ee\u7528\u6237<\/p>\n

\u5728FTP\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u4f1a\u9ed8\u8ba4\u4e3a\u6211\u4eec\u521b\u5efa\u7528\u6237\u540d\u4e3aftp\u7684\u7528\u6237\uff0c\u9ed8\u8ba4\u65e0\u5bc6\u7801\u3002\u6211\u4eec\u9700\u8981\u4e3a\u5176\u8bbe\u7f6e\u5bc6\u7801\u3002\u8f93\u5165:<\/p>\n

sudo passwd ftp <\/code><\/pre>\n

\u7136\u540e\u8f93\u5165\u5bc6\u7801\uff0c\u518d\u786e\u8ba4\u5bc6\u7801\u3002<\/p>\n

\n \"ubuntu\u642d\u5efaftp\u670d\u52a1\u5668\u7684\u6b65\u9aa4_ubuntu\n<\/div>\n

\u63a5\u7740\u6211\u4eec\u521b\u5efaftp\u7528\u6237\u7684\u5bb6\u76ee\u5f55\uff0c\u5373ftp\u6587\u4ef6\u7684\u5b58\u50a8\u8def\u5f84\u3002\u901a\u8fc7\u5982\u4e0b\u547d\u4ee4\u521b\u5efa:<\/p>\n

sudo mkdir \/home\/ftp <\/code><\/pre>\n

\u7136\u540e\u8bbe\u7f6eftp\u76ee\u5f55\u7684\u6743\u9650\uff0c\u5728\u8fd9\u91cc\u6211\u4eec\u8d4b\u4e88\uff0c\u8bfb\u3001\u5199\u3001\u5b8c\u5168\u63a7\u5236\u6743\u9650\u3002\u4f60\u4e5f\u53ef\u4ee5\u6839\u636e\u81ea\u5df1\u7684\u9700\u6c42\u4fee\u6539\u76f8\u5e94\u6743\u9650\u3002<\/p>\n

sudo chmod 777 \/home\/ftp <\/code><\/pre>\n

4.\u914d\u7f6eFTP\u670d\u52a1<\/p>\n

ftp\u914d\u7f6e\u6587\u4ef6\u5b58\u653e\u8def\u5f84:<\/p>\n

\/etc\/vsftpd.conf <\/code><\/pre>\n

\u901a\u8fc7gedit \u6216\u8005vim\u6253\u5f00\u8be5\u6587\u4ef6\uff0c\u8fdb\u884c\u4fee\u6539<\/p>\n

sudo gedit \/etc\/vsftpd.conf <\/code><\/pre>\n

\u4fee\u6539\u89c4\u5219\u5982\u4e0b:<\/p>\n

#\u53d6\u6d88\u5982\u4e0b\u914d\u7f6e\u524d\u7684\u6ce8\u91ca\u7b26\u53f7\uff1a local_enable=YES\uff08\u662f\u5426\u5141\u8bb8\u672c\u5730\u7528\u6237\u767b\u5f55\uff09 write_enable=YES\uff08\u662f\u5426\u5141\u8bb8\u672c\u5730\u7528\u6237\u5199\u7684\u6743\u9650\uff09 chroot_local_user=YES\uff08\u662f\u5426\u5c06\u6240\u6709\u7528\u6237\u9650\u5236\u5728\u4e3b\u76ee\u5f55\uff09 chroot_list_enable=YES\uff08\u662f\u5426\u542f\u52a8\u9650\u5236\u7528\u6237\u7684\u540d\u5355\uff09 chroot_list_file=\/etc\/vsftpd.chroot_list\uff08\u53ef\u5728\u6587\u4ef6\u4e2d\u8bbe\u7f6e\u591a\u4e2a\u8d26\u53f7\uff09 #\u4fee\u6539\u5982\u4e0b\u914d\u7f6e anonymous_enable=NO \uff08\u4e0d\u5141\u8bb8\u533f\u540d\u8bbf\u95ee\uff0c\u5fc5\u987b\u767b\u5f55\uff09 chown_uploads=YES \uff08\u5141\u8bb8\u4e0a\u4f20\u6539\u53d8\uff09 #\u5e76\u4e14\u6dfb\u52a0\u5982\u4e0b\u5185\u5bb9 local_root=\/home\/ftp \uff08\u8bbf\u95ee\u76ee\u5f55\uff09 allow_writeable_chroot=YES <\/code><\/pre>\n

\u540c\u65f6\u5728\/etc\u4e0b\u521b\u5efavsftpd.chroot_list\u6587\u4ef6\uff0c\u8fd9\u4e2a\u6587\u4ef6\u521b\u5efa\u5b8c\u6210\u4fdd\u6301\u4e3a\u7a7a\u5373\u53ef<\/p>\n

sudo touch \/etc\/vsftpd.chroot_list <\/code><\/pre>\n

5.\u91cd\u542f\u53ca\u5f00\u673a\u81ea\u542f\u52a8<\/p>\n

sudo service vsftpd restart #\u91cd\u542f <\/code><\/pre>\n

\u6d4b\u8bd5\uff0c\u5728\u7ec8\u7aef\u4e2d\u8f93\u5165ftp localhost\uff0c\u7136\u540e\u8f93\u5165\u7528\u6237\u540d\u4e0e\u5bc6\u7801\u5b9e\u73b0\u767b\u5f55\u3002<\/p>\n

ftp localhost <\/code><\/pre>\n

\u5982\u679c\u767b\u5f55ftp\u603b\u662f\u51fa\u73b0\u5bc6\u7801\u9519\u8bef\uff0c\u53ef\u4ee5\u5c06\/etc\/vsftpd.conf\u914d\u7f6e\u6587\u4ef6\u7684pam_service_name=vsftpd\u6539\u4e3apam_service_name=ftp\uff0c\u5373\u53ef\u89e3\u51b3\u3002<\/p>\n

pam_service_name=ftp <\/code><\/pre>\n

\u4fee\u6539\u5b8c\u6210\uff0c\u91cd\u542fftp\uff0c\u6d4b\u8bd5\u3002\u91cd\u590d\u6b65\u9aa45<\/p>\n

6.\u6d4b\u8bd5<\/p>\n

\u901a\u8fc7filezilla\u5de5\u5177\u6d4b\u8bd5<\/p>\n

\n \"ubuntu\u642d\u5efaftp\u670d\u52a1\u5668\u7684\u6b65\u9aa4_ubuntu\n<\/div>\n

\u8fde\u63a5\u6210\u529f\u540e\uff0c\u5982\u56fe\u6240\u793a<\/p>\n

\n \"ubuntu\u642d\u5efaftp\u670d\u52a1\u5668\u7684\u6b65\u9aa4_ubuntu\n<\/div>\n

\u6807\u7b7e: ubuntu, ftp<\/p>\n","protected":false},"excerpt":{"rendered":"ubuntu\u642d\u5efaftp\u670d\u52a1\u5668\u7684\u6b65\u9aa4_ubuntu ftp\u547d\u4ee4Ubuntu20.04\u642d\u5efaFTP\u6587\u4ef6\u7cfb\u7edf-\u674e\u4e1c\u9633-\u535a\u5ba2\u56edUbuntu20.04\u642d\u5efaFTP\u6587\u4ef6\u7cfb\u7edf1.\u66f4\u65b0\u6e90sud...","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"_links":{"self":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts\/8074"}],"collection":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/comments?post=8074"}],"version-history":[{"count":0,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts\/8074\/revisions"}],"wp:attachment":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/media?parent=8074"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/categories?post=8074"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/tags?post=8074"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}