{"id":306,"date":"2013-02-14T04:56:06","date_gmt":"2013-02-14T04:56:06","guid":{"rendered":"https:\/\/shan.info\/new\/500-oops-cannot-change-directory-home-ftp\/"},"modified":"2013-02-14T04:56:06","modified_gmt":"2013-02-14T04:56:06","slug":"500-oops-cannot-change-directory-home-ftp","status":"publish","type":"post","link":"https:\/\/shan.info\/new\/500-oops-cannot-change-directory-home-ftp\/","title":{"rendered":"proftpd 500 OOPS: cannot change directory:\/home\/ftp"},"content":{"rendered":"<p>\n\t&nbsp;<\/p>\n<p class=\"hl-firstline\" style=\"line-height: 19px; margin: 10px auto; color: rgb(75, 75, 75); font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px;\">\n\t\u4f46\u5ba2\u6237\u7aef\u8bbf\u95ee\u63d0\u793a\u5982\u4e0b\u9519\u8bef\uff1a<\/p>\n<p style=\"line-height: 19px; margin: 10px auto; color: rgb(75, 75, 75); font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px;\">\n\t500 OOPS: cannot change directory:\/home\/ftp<\/p>\n<p style=\"line-height: 19px; margin: 10px auto; color: rgb(75, 75, 75); font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px;\">\n\t\u539f\u56e0\u662f\u4ed6\u7684CentOS\u7cfb\u7edf\u5b89\u88c5\u4e86SELinux\uff0c\u56e0\u4e3a\u9ed8\u8ba4\u4e0b\u662f\u6ca1\u6709\u5f00\u542fFTP\u7684\u652f\u6301\uff0c\u6240\u4ee5\u8bbf\u95ee\u65f6\u90fd\u88ab\u963b\u6b62\u4e86\u3002<\/p>\n<p style=\"line-height: 19px; margin: 10px auto; color: rgb(75, 75, 75); font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px;\">\n\t\/\/\u67e5\u770bSELinux\u8bbe\u7f6e<\/p>\n<p style=\"line-height: 19px; margin: 10px auto; color: rgb(75, 75, 75); font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px;\">\n\t&nbsp;<\/p>\n<p style=\"margin: 10px auto;\">\n\t# getsebool -a|grep ftp<\/p>\n<p style=\"margin: 10px auto;\">\n\tftp_home_dir&#8211;&gt;off<\/p>\n<p style=\"margin: 10px auto;\">\n\t&nbsp;<\/p>\n<p style=\"margin: 10px auto;\">\n\t\/\/\u4f7f\u7528setsebool\u547d\u4ee4\u5f00\u542f<\/p>\n<p style=\"margin: 10px auto;\">\n\t&nbsp;<\/p>\n<p style=\"margin: 10px auto;\">\n\t&nbsp;<\/p>\n<p style=\"margin: 10px auto;\">\n\t# setsebool ftp_home_dir 1<\/p>\n<p style=\"margin: 10px auto;\">\n\t&nbsp;<\/p>\n<p style=\"margin: 10px auto;\">\n\t\u7531\u4e8e\u64cd\u4f5c\u7cfb\u7edf\u4e00\u65e6\u91cd\u542f\u540e\uff0c\u8fd9\u79cd\u8bbe\u7f6e\u9700\u8981\u91cd\u65b0\u8bbe\u7f6e\uff0c\u8fd9\u91cc\u4f7f\u7528-P\u53c2\u6570\u5b9e\u73b0.<\/p>\n<p style=\"margin: 10px auto;\">\n\t&nbsp;<\/p>\n<p style=\"margin: 10px auto;\">\n\t\/\/setsebool\u4f7f\u7528-P\u53c2\u6570\uff0c\u65e0\u9700\u6bcf\u6b21\u5f00\u673a\u90fd\u8f93\u5165\u8fd9\u4e2a\u547d\u4ee4<\/p>\n<p style=\"margin: 10px auto;\">\n\t&nbsp;<\/p>\n<p style=\"margin: 10px auto;\">\n\t# setsebool -P ftp_home_dir 1<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; \u4f46\u5ba2\u6237\u7aef\u8bbf\u95ee\u63d0\u793a\u5982\u4e0b\u9519\u8bef\uff1a 500 OOPS: cannot change directory:\/home\/ftp \u539f\u56e0\u662f\u4ed6\u7684CentOS\u7cfb\u7edf\u5b89\u88c5\u4e86SELinux\uff0c\u56e0\u4e3a\u9ed8\u8ba4\u4e0b\u662f\u6ca1\u6709\u5f00\u542fFTP\u7684\u652f\u6301\uff0c\u6240\u4ee5\u8bbf\u95ee\u65f6\u90fd\u88ab\u963b\u6b62\u4e86\u3002 \/\/\u67e5\u770bSELinux\u8bbe\u7f6e &nbsp; # getsebool -a|grep ftp ftp_home_dir&#8211;&gt;off &nbsp; \/\/\u4f7f\u7528setsebool\u547d\u4ee4\u5f00\u542f &nbsp; &nbsp; # setsebool ftp_home_dir 1 &nbsp; \u7531\u4e8e\u64cd\u4f5c\u7cfb\u7edf\u4e00\u65e6\u91cd\u542f\u540e\uff0c\u8fd9\u79cd\u8bbe\u7f6e\u9700\u8981\u91cd\u65b0\u8bbe\u7f6e\uff0c\u8fd9\u91cc\u4f7f\u7528-P\u53c2\u6570\u5b9e\u73b0. &nbsp; \/\/setsebool\u4f7f\u7528-P\u53c2\u6570\uff0c\u65e0\u9700\u6bcf\u6b21\u5f00\u673a\u90fd\u8f93\u5165\u8fd9\u4e2a\u547d\u4ee4 &nbsp; # setsebool -P ftp_home_dir 1<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33],"tags":[],"class_list":["post-306","post","type-post","status-publish","format-standard","hentry","category-centos-6"],"_links":{"self":[{"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/posts\/306","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/comments?post=306"}],"version-history":[{"count":0,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/posts\/306\/revisions"}],"wp:attachment":[{"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/media?parent=306"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/categories?post=306"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/tags?post=306"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}