{"id":325,"date":"2019-04-28T00:02:25","date_gmt":"2019-04-27T16:02:25","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=325"},"modified":"2022-05-06T17:27:25","modified_gmt":"2022-05-06T09:27:25","slug":"chmod","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/chmod","title":{"rendered":"chmod\u547d\u4ee4 – \u6539\u53d8\u6587\u4ef6\u6216\u76ee\u5f55\u6743\u9650"},"content":{"rendered":"\n

chmod\u547d\u4ee4\u6765\u81ea\u4e8e\u82f1\u6587\u8bcd\u7ec4\u201dchange mode\u201c\u7684\u7f29\u5199\uff0c\u5176\u529f\u80fd\u662f\u7528\u4e8e\u6539\u53d8\u6587\u4ef6\u6216\u76ee\u5f55\u6743\u9650\u7684\u547d\u4ee4\u3002\u9ed8\u8ba4\u53ea\u6709\u6587\u4ef6\u7684\u6240\u6709\u8005\u548c\u7ba1\u7406\u5458\u53ef\u4ee5\u8bbe\u7f6e\u6587\u4ef6\u6743\u9650\uff0c\u666e\u901a\u7528\u6237\u53ea\u80fd\u7ba1\u7406\u81ea\u5df1\u6587\u4ef6\u7684\u6743\u9650\u5c5e\u6027\u3002<\/p>\n\n\n\n

\u8bbe\u7f6e\u6743\u9650\u65f6\u53ef\u4ee5\u4f7f\u7528\u6570\u5b57\u6cd5\uff0c\u4ea6\u53ef\u4f7f\u7528\u5b57\u6bcd\u8868\u8fbe\u5f0f\uff0c\u5bf9\u4e8e\u76ee\u5f55\u6587\u4ef6\u5efa\u8bae\u52a0\u5165-R\u53c2\u6570\u8fdb\u884c\u9012\u5f52\u64cd\u4f5c\uff0c\u610f\u5473\u7740\u4e0d\u4ec5\u5bf9\u4e8e\u76ee\u5f55\u672c\u8eab\uff0c\u4e5f\u5bf9\u76ee\u5f55\u5185\u7684\u5b50\u6587\u4ef6\/\u76ee\u5f55\u90fd\u8fdb\u884c\u65b0\u6743\u9650\u7684\u8bbe\u5b9a\u3002<\/p>\n\n\n\n

\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong> chmod \u53c2\u6570 \u6587\u4ef6<\/p>\n\n\n\n

\u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n

-c <\/td>\u82e5\u8be5\u6587\u4ef6\u6743\u9650\u786e\u5b9e\u5df2\u7ecf\u66f4\u6539\uff0c\u624d\u663e\u793a\u5176\u66f4\u6539\u52a8\u4f5c <\/td><\/tr>
-f<\/td>\u82e5\u8be5\u6587\u4ef6\u6743\u9650\u65e0\u6cd5\u88ab\u66f4\u6539\u4e5f\u4e0d\u663e\u793a\u9519\u8bef\u8baf\u606f <\/td><\/tr>
-v<\/td>\u663e\u793a\u6743\u9650\u53d8\u66f4\u7684\u8be6\u7ec6\u8d44\u6599 <\/td><\/tr>
-R<\/td>\u5bf9\u76ee\u524d\u76ee\u5f55\u4e0b\u7684\u6240\u6709\u6587\u4ef6\u4e0e\u5b50\u76ee\u5f55\u8fdb\u884c\u76f8\u540c\u7684\u6743\u9650\u53d8\u66f4(\u5373\u4ee5\u9012\u56de\u7684\u65b9\u5f0f\u9010\u4e2a\u53d8\u66f4) <\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n

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

\u8bbe\u5b9a\u67d0\u4e2a\u6587\u4ef6\u7684\u6743\u9650\u4e3a775\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# chmod 775 anaconda-ks.cfg<\/strong><\/pre>\n\n\n\n

\u8bbe\u5b9a\u67d0\u4e2a\u6587\u4ef6\u8ba9\u4efb\u4f55\u4eba\u90fd\u53ef\u4ee5\u8bfb\u53d6\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# chmod a+r anaconda-ks.cfg <\/strong><\/pre>\n\n\n\n

\u8bbe\u5b9a\u67d0\u4e2a\u76ee\u5f55\u53ca\u5176\u5185\u5b50\u6587\u4ef6\u4efb\u4f55\u4eba\u90fd\u53ef\u4ee5\u8bfb\u53d6\u548c\u8bfb\u53d6\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# chmod -R a+r Documents<\/strong><\/pre>\n\n\n\n

\u8bbe\u5b9a\u67d0\u4e2a\u4e8c\u8fdb\u5236\u547d\u4ee4\u6587\u4ef6\u4e0a\u65b0\u589eSUID\u7279\u6b8a\u6743\u9650\u4f4d\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# chmod u+s \/sbin\/reboot <\/strong><\/pre>\n","protected":false},"excerpt":{"rendered":"

chmod\u547d\u4ee4\u6765\u81ea\u4e8e\u82f1\u6587\u8bcd\u7ec4\u201dchange mode\u201c\u7684\u7f29\u5199\uff0c\u5176\u529f\u80fd\u662f\u7528\u4e8e\u6539\u53d8\u6587\u4ef6\u6216\u76ee\u5f55\u6743\u9650\u7684\u547d\u4ee4\u3002\u9ed8\u8ba4\u53ea\u6709\u6587 […]<\/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\/325"}],"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=325"}],"version-history":[{"count":7,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/325\/revisions"}],"predecessor-version":[{"id":9315,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/325\/revisions\/9315"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=325"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=325"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=325"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}