{"id":8482,"date":"2020-08-28T12:58:39","date_gmt":"2020-08-28T04:58:39","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=8482"},"modified":"2020-08-28T12:58:39","modified_gmt":"2020-08-28T04:58:39","slug":"fixfiles","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/fixfiles","title":{"rendered":"fixfiles\u547d\u4ee4 – \u4fee\u590d\u5b89\u5168\u4e0a\u4e0b\u6587"},"content":{"rendered":"\n
fixfiles\u547d\u4ee4\u7684\u4f5c\u7528\u662f\u53ef\u4ee5\u4fee\u6539RPM\u6570\u636e\u5305\u91cc\u7684\u6587\u4ef6\u7684\u5b89\u5168\u4e0a\u4e0b\u6587\u3002RPM\u5305\u5b89\u88c5\u7684\u4f1a\u6839\u636erpm\u5305\u5185\u8bb0\u5f55\u6765\u751f\u6210\u5b89\u5168\u4e0a\u4e0b\u6587\u3002<\/p>\n\n\n\n
\u5173\u4e8e\u5b89\u5168\u4e0a\u4e0b\u6587\u7684\u89e3\u91ca\uff1a\u6240\u6709\u7684\u64cd\u4f5c\u7cfb\u7edf\u8bbf\u95ee\u63a7\u5236\u90fd\u662f\u4e3b\u4f53\u548c\u5ba2\u4f53\u7684\u76f8\u5173\u8bbf\u95ee\u63a7\u5236\u5c5e\u6027\u6765\u5b9e\u73b0\uff0c\u5728SELinux\u4e2d\u8bbf\u95ee\u63a7\u5236\u5c5e\u6027\u79f0\u4e3a\u5b89\u5168\u4e0a\u4e0b\u6587\u3002<\/p>\n\n\n\n
\u5b89\u5168\u4e0a\u4e0b\u6587\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u3001\u4e00\u81f4\u7684\u8bbf\u95ee\u63a7\u5236\u5c5e\u6027\uff0c\u6240\u6709\u5ba2\u4f53\uff08\u6587\u4ef6\uff0c\u8fdb\u7a0b\u95f4\u901a\u4fe1\uff0c\u901a\u4fe1\u7ba1\u9053\uff0c\u5957\u63a5\u5b57\uff0c\u7f51\u7edc\u4e3b\u673a\u7b49\uff09\u548c\u4e3b\u4f53\uff08\u8fdb\u7a0b\uff09\u6709\u4e00\u4e2a\u548c\u5ba2\u4f53\u548c\u4ed6\u4eec\u76f8\u5173\u7684\u5355\u4e00\u5b89\u5168\u4e0a\u4e0b\u6587\uff0c\u4e00\u4e2a\u8fdb\u7a0b\u7684\u7c7b\u578b\u901a\u5e38\u79f0\u4e3a\u57df\uff0c\u57df\u548c\u57df\u7c7b\u578b\u90fd\u4e00\u6837\uff0c\u5373\u90fd\u662f\u5b89\u5168\u4e0a\u4e0b\u6587\u7684’TYPE’\uff0c\u4e00\u4e2a\u5b89\u5168\u4e0a\u4e0b\u6587\u662f\u7531\u89d2\u8272\uff0c\u7528\u6237\u548c\u7c7b\u578b\u6807\u8bc6\u7b26\u7ec4\u6210\u3002<\/p>\n\n\n\n
\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>fixfiles [\u53c2\u6570] [\u6982\u8981]<\/p>\n\n\n\n \u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n \u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n \u68c0\u67e5\u6307\u5b9a\u8f6f\u4ef6\u5305\u4e2d\u6587\u4ef6\u7684\u5b89\u5168\u4e0a\u4e0b\u6587\uff1a<\/p>\n\n\n\n \u4fee\u6539crontabs\u8f6f\u4ef6\u5305\u4e2d\u6587\u4ef6\u7684\u5b89\u5168\u4e0a\u4e0b\u6587\uff1a<\/p>\n\n\n\n \u5217\u51fa\u4e0d\u6b63\u786e\u7684\u6587\u4ef6\u4e0a\u4e0b\u6587\u6807\u7b7e\uff1a<\/p>\n\n\n\n fixfiles\u547d\u4ee4\u7684\u4f5c\u7528\u662f\u53ef\u4ee5\u4fee\u6539RPM\u6570\u636e\u5305\u91cc\u7684\u6587\u4ef6\u7684\u5b89\u5168\u4e0a\u4e0b\u6587\u3002RPM\u5305\u5b89\u88c5\u7684\u4f1a\u6839\u636erpm\u5305\u5185\u8bb0\u5f55\u6765\u751f\u6210 […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/8482"}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=8482"}],"version-history":[{"count":4,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/8482\/revisions"}],"predecessor-version":[{"id":8503,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/8482\/revisions\/8503"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=8482"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=8482"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=8482"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}-l<\u65e5\u5fd7\u6587\u4ef6><\/td> \u5c06\u8f93\u51fa\u4fdd\u5b58\u5230\u6307\u5b9a\u7684\u65e5\u5fd7\u6587\u4ef6<\/td><\/tr> -F<\/td> \u5f3a\u5236\u91cd\u7f6e\u4e0a\u4e0b\u6587\u4e3a\u5339\u914dfile_context\u7684\u81ea\u5b9a\u4e49\u6587\u4ef6<\/td><\/tr> -f<\/td> \u6e05\u9664\/tmp\u76ee\u5f55<\/td><\/tr> -R<RPM\u8f6f\u4ef6\u5305\u540d\u79f0><\/td> \u4f7f\u7528rpm\u6570\u636e\u5e93\uff0c\u4ee5\u53d1\u73b0\u6307\u5b9a\u6570\u636e\u5305\u4e2d\u7684\u6240\u6709\u6587\u4ef6\u548c\u6062\u590d\u6587\u4ef6\u7684\u4e0a\u4e0b\u6587<\/td><\/tr> check<\/td> \u663e\u793a\u4efb\u4f55\u4e0d\u6b63\u786e\u7684\u6587\u4ef6\u4e0a\u4e0b\u6587\u6807\u7b7e\uff0c\u663e\u793a\u65b0\u8001\u4e0a\u4e0b\u6587\uff0c\u4f46\u4e0d\u6539\u53d8\u5b83\u4eec<\/td><\/tr> restore<\/td> \u66f4\u6539\u4efb\u4f55\u4e0d\u6b63\u786e\u7684\u6587\u4ef6\u4e0a\u4e0b\u6587\u6807\u7b7e<\/td><\/tr> relabel<\/td> \u63d0\u793a\u53bb\u9664\/tmp\u76ee\u5f55\u4e2d\u7684\u5185\u5bb9\uff0c\u7136\u540e\u66f4\u6539\u4efb\u4f55\u4e0d\u6b63\u786e\u7684\u6587\u4ef6\u4e0a\u4e0b\u6587<\/td><\/tr> verify<\/td> \u5217\u51fa\u4e0d\u6b63\u786e\u7684\u6587\u4ef6\u4e0a\u4e0b\u6587\u6807\u7b7e\uff0c\u4f46\u4e0d\u6539\u53d8\u5b83\u4eec<\/td><\/tr> [dir\/file]<\/td> \u68c0\u67e5\u6587\u4ef6\u4e0a\u4e0b\u6587\u4e2d\u7684\u6587\u4ef6\u6216\u76ee\u5f55\u6811\u5217\u8868<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n [root@linuxcool ~]# fixfiles -R crontabs check<\/pre>\n\n\n\n
[root@linuxcool ~]# fixfiles -R crontabs restore<\/pre>\n\n\n\n
[root@linuxcool ~]# fixfiles -R crontabs verify<\/pre>\n","protected":false},"excerpt":{"rendered":"