{"id":5597,"date":"2019-11-25T18:06:54","date_gmt":"2019-11-25T10:06:54","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=5597"},"modified":"2020-08-28T13:31:43","modified_gmt":"2020-08-28T05:31:43","slug":"restorecon","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/restorecon","title":{"rendered":"restorecon\u547d\u4ee4 – \u6062\u590d\u6587\u4ef6\u5c5e\u6027"},"content":{"rendered":"\n
restorecon\u547d\u4ee4\u7684\u4f5c\u7528\u662f\u53ef\u4ee5\u4fee\u590dSELinux\u6587\u4ef6\u5c5e\u6027\u5373\u6062\u590d\u6587\u4ef6\u7684\u5b89\u5168\u4e0a\u4e0b\u6587\u3002<\/p>\n\n\n\n
\u5728Selinux\u4e2d\uff0c\u4e00\u5207\u7686\u5bf9\u8c61\uff0c\u7531\u5b58\u653e\u5728\u8282\u70b9\u7684\u6269\u5c55\u5c5e\u6027\u57df\u7684\u5b89\u5168\u5143\u7d20\u6240\u63a7\u5236\u5176\u8bbf\u95ee\u3002\u6240\u6709\u6587\u4ef6\u548c\u7aef\u53e3\u8d44\u6e90\u548c\u8fdb\u7a0b\u90fd\u5177\u5907\u5b89\u5168\u6807\u7b7e\u5c31\u662f\u5b89\u5168\u4e0a\u4e0b\u6587\u3002<\/p>\n\n\n\n
\u4e00\u822c\u60c5\u51b5\u4e0b\uff0ccp\u547d\u4ee4\u4f1a\u91cd\u65b0\u751f\u6210\u7b26\u5408\u76ee\u5f55\u672c\u8eab\u7684\u5b89\u5168\u4e0a\u4e0b\u6587,\u5f53\u7136\u53ef\u4ee5\u4f7f\u7528-p\u53c2\u6570\uff0cmv\u547d\u4ee4\u53ea\u662f\u5355\u7eaf\u5c06\u539f\u6709\u6587\u4ef6\u79fb\u52a8\u8fc7\u53bb \u4e0d\u6539\u53d8\u6587\u4ef6\u672c\u8eab\u7684\u5c5e\u6027\uff0c\u8981\u7528\u5230restorecon\u547d\u4ee4\u3002<\/p>\n\n\n\n
\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>restorecon [\u53c2\u6570]<\/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 \u6062\u590d\u7f51\u9875\u4e3b\u76ee\u5f55\u4e2d\u6240\u6709\u6587\u4ef6\u7684SELinux\u914d\u7f6e\u4fe1\u606f:<\/p>\n\n\n\n restorecon\u547d\u4ee4\u7684\u4f5c\u7528\u662f\u53ef\u4ee5\u4fee\u590dSELinux\u6587\u4ef6\u5c5e\u6027\u5373\u6062\u590d\u6587\u4ef6\u7684\u5b89\u5168\u4e0a\u4e0b\u6587\u3002 \u5728Selinux\u4e2d\uff0c\u4e00 […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[7],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/5597"}],"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=5597"}],"version-history":[{"count":4,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/5597\/revisions"}],"predecessor-version":[{"id":8638,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/5597\/revisions\/8638"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=5597"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=5597"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=5597"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}-i<\/td> \u5ffd\u7565\u4e0d\u5b58\u5728\u7684\u6587\u4ef6<\/td><\/tr> -f<\/td> infilename \u6587\u4ef6 infilename \u4e2d\u8bb0\u5f55\u8981\u5904\u7406\u7684\u6587\u4ef6<\/td><\/tr> -e<\/td> directory \u6392\u9664\u76ee\u5f55<\/td><\/tr> -v<\/td> \u5c06\u8fc7\u7a0b\u663e\u793a\u5230\u5c4f\u5e55\u4e0a<\/td><\/tr> -F<\/td> \u5f3a\u5236\u6062\u590d\u6587\u4ef6\u5b89\u5168\u8bed\u5883<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n [root@linuxcool ~]# restorecon -R \/var\/www\/html\/<\/pre>\n","protected":false},"excerpt":{"rendered":"