{"id":157,"date":"2007-07-20T15:43:05","date_gmt":"2007-07-20T07:43:05","guid":{"rendered":"http:\/\/www.liangliang.org.cn\/blog\/?p=157"},"modified":"2007-07-20T15:43:05","modified_gmt":"2007-07-20T07:43:05","slug":"vsftpd-dead-but-subsys-locked-%e8%a7%a3%e9%99%a4%e6%96%b9%e6%b3%95%e6%b1%87%e6%80%bbred-hat-enterprise-linux-4","status":"publish","type":"post","link":"https:\/\/www.liangliang.org.cn\/?p=157","title":{"rendered":"vsftpd dead , but subsys locked &#8211;\u89e3\u9664\u65b9\u6cd5\u6c47\u603b(Red Hat Enterprise Linux 4)"},"content":{"rendered":"<p>vsftpd dead , but subsys locked --\u89e3\u9664\u65b9\u6cd5\u6c47\u603b(Red Hat Enterprise Linux 4)<\/p>\n<p>\u7cfb\u7edf: RHEL4<\/p>\n<p>ftp\u8f6f\u4ef6:vsftpd 2.**** , \u4e0e xinetd \u5206\u79bb\u8fd0\u884c.<\/p>\n<p>\u72b6\u6001: \u6267\u884c\u7528service vsftpd status -&gt;vsftpd dead, but subsys locked ,\u91cd\u65b0\u5b89\u88c5vsftp,\u7ed3\u679c\u4f9d\u65e7.<\/p>\n<p>1. \u5148\u5220\u9664 \/var\/lock\/subsys\/vsftpd -&gt; rm -frv  \/var\/lock\/subsys\/vsftpd<\/p>\n<p>2.  \u4ee5\u4e0b\u51e0\u79cd\u53ef\u80fd\u7684\u89e3\u51b3\u65b9\u6cd5(\u6216\u8005\u5173\u7cfb)<\/p>\n<p>a.  \u4ed4\u7ec6\u68c0\u67e5\/etc\/vsftpd\/vsftpd.conf\u7684\u914d\u7f6e\u6587\u4ef6\u7684\u5185\u5bb9\u683c\u5f0f.\u786e\u5b9a\u6b63\u786e,\u4e3b\u8981\u662f\u5168\u89d2\u534a\u89d2\u5b57\u7b26\u7684\u7f16\u7801\u9519\u8bef.<\/p>\n<p>b.  \u786e\u8ba4                listen=YES       TCP_trappers=YES<\/p>\n<p>c. cp \/etc\/vsftpd\/vsftpd.conf    \/etc\/vsftpd\/vsftpd.conf.bak   \\  rm -f \/etc\/vsftpd\/vsftpd.conf<\/p>\n<p>cp \/etc\/vsftpd\/vsftpd.conf .bak   \/etc\/vsftpd\/vsftpd.conf    \\ rm -f   \/etc\/vsftpd\/vsftpd.conf.bak<\/p>\n<p>\u8bf4\u660e:cp \u548cmv\u547d\u4ee4\u5bf9selinux security context\u5f71\u54cd  cp\u5c06\u62f7\u8d1d\u8fc7\u53bb\u7684\u6587\u4ef6\u7684context\u6539\u53d8\u4e3a\u76ee\u7684\u76ee\u5f55\u7684context,\u800cmv\u5219\u4e0d\u4f1a\u6539\u53d8\u79fb\u52a8\u6587\u4ef6\u7684context<\/p>\n<p>(I've had problems like this before, and I finally found out what the problem was. When you 'mv' a file (like a config file from a home dir to the proper location) it keeps the selinux context setting from the originating directory. When you 'cp' a file, it will change that context to the context of the directory being moved too. I have mv'd backups of configs from home dir to \/etc and ran into the same error message. If you do a fixfiles relabel, or touch \/.autorelabel and reboot, it should re-write the security context and hopefully clear up your problems.)<\/p>\n<p>d. \u5173\u95ed xinetd \u670d\u52a1, \u5148\u542f\u52a8 vsftpd, \u518d\u542f\u52a8xinetd .  (\u5220\u9664gssftp)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>vsftpd dead , but subsys locked &#8211;\u89e3\u9664\u65b9\u6cd5\u6c47\u603b(Red Hat Enterprise Linux 4) \u7cfb\u7edf: RHEL4 ftp\u8f6f\u4ef6:vsftpd 2.**** ,&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-157","post","type-post","status-publish","format-standard","hentry","category-ftp"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=\/wp\/v2\/posts\/157","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=157"}],"version-history":[{"count":0,"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=\/wp\/v2\/posts\/157\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=157"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=157"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=157"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}