{"id":4972,"date":"2019-09-21T21:04:41","date_gmt":"2019-09-21T13:04:41","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=4972"},"modified":"2019-09-21T21:04:43","modified_gmt":"2019-09-21T13:04:43","slug":"dpkg-statoverride","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/dpkg-statoverride","title":{"rendered":"dpkg-statoverride\u547d\u4ee4 – \u6539\u5199\u6240\u6709\u6743\u548c\u6a21\u5f0f"},"content":{"rendered":"\n

dpkg-statoverride\u547d\u4ee4\u662fDebian linux\u4e0b\u6539\u5199\u8f6f\u4ef6\u5305\u72b6\u6001\u7684\u5b9e\u7528\u5de5\u5177\uff0cdpkg-statoverride\u547d\u4ee4\u67093\u4e2a\u57fa\u672c\u529f\u80fd\u5373\u6dfb\u52a0\u3001\u5220\u9664\u3001\u548c\u663e\u793a\u6539\u5199\u5217\u8868\u3002<\/p>\n\n\n\n

\u4f7f\u7528dpkg-statoverride\u547d\u4ee4\u5220\u9664\u6539\u5199\u540e\uff0c\u5982\u679c\u5e0c\u671b\u6062\u590d\u65e7\u7684\u6743\u9650\uff0c\u9700\u8981\u624b\u5de5\u8bbe\u7f6e\u6743\u9650\u6216\u91cd\u65b0\u5b89\u88c5\u5305\u542b\u8be5\u6587\u4ef6\u7684\u8f6f\u4ef6\u5305\u3002<\/p>\n\n\n\n

\u8bed\u6cd5\u683c\u5f0f:<\/strong> dpkg-statoverride [\u53c2\u6570]<\/p>\n\n\n\n

\u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n
-add<\/td>\u4e3a\u6587\u4ef6\u6dfb\u52a0\u4e00\u4e2a\u6539\u5199<\/td><\/tr>
-- -remove<\/td>\u4e3a\u6587\u4ef6\u5220\u9664\u4e00\u4e2a\u6539\u5199<\/td><\/tr>
-- -list<\/td>\u663e\u793a\u6240\u6709\u6539\u5199\u5217\u8868<\/td><\/tr>
-- -update<\/td>\u5982\u679c\u6587\u4ef6\u5b58\u5728\uff0c\u5219\u7acb\u523b\u6267\u884c\u6539\u5199\u64cd\u4f5c<\/td><\/tr><\/tbody><\/table>\n\n\n\n

\u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n

\u663e\u793a\u5f53\u524d\u6240\u6709\u6539\u5199\u5217\u8868\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# dpkg-statoverride --list<\/pre>\n\n\n\n

\u4fee\u6539\u6587\u4ef6\u5939\u7684\u6743\u9650\u5c5e\u6027\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# dpkg-statoverride --update --add nagios nagios 751 \/var\/lib\/nagios3<\/pre>\n\n\n\n

\u5f3a\u5236\u4fee\u6539\u6587\u4ef6\u5939\u7684\u6743\u9650\u5c5e\u6027\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# dpkg-statoverride --force --update --add root sasl 755 \/var\/spool\/postfix\/var\/run\/saslauthd<\/pre>\n\n\n\n

\u5c06\u6587\u4ef6\u4ece\u6570\u636e\u5e93\u4e2d\u5220\u9664\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# dpkg-statoverride --remove \/usr\/bin\/wall<\/pre>\n","protected":false},"excerpt":{"rendered":"

dpkg-statoverride\u547d\u4ee4\u662fDebian linux\u4e0b\u6539\u5199\u8f6f\u4ef6\u5305\u72b6\u6001\u7684\u5b9e\u7528\u5de5\u5177\uff0cdpkg-stat […]<\/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\/4972"}],"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=4972"}],"version-history":[{"count":5,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/4972\/revisions"}],"predecessor-version":[{"id":5021,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/4972\/revisions\/5021"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=4972"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=4972"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=4972"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}