{"id":290847,"date":"2024-04-14T05:20:50","date_gmt":"2024-04-13T21:20:50","guid":{"rendered":"https:\/\/gulass.cn\/lwjsqjmszqxr.html"},"modified":"2024-04-14T05:20:50","modified_gmt":"2024-04-13T21:20:50","slug":"lwjsqjmszqxr","status":"publish","type":"post","link":"https:\/\/gulass.cn\/lwjsqjmszqxr.html","title":{"rendered":"Linux\u6587\u4ef6\u6388\u6743\u63ed\u79d8\uff1a\u6570\u5b57\u6743\u9650\u5982\u4f55\u4fdd\u62a4\u60a8\u7684\u654f\u611f\u4fe1\u606f\uff1f"},"content":{"rendered":"

\u7406\u89e3Linux<\/a>\u6587\u4ef6\u6388\u6743<\/b><\/p>\n

\u5728Linux\u64cd\u4f5c\u7cfb\u7edf<\/a>\u4e2d\uff0c\u6587\u4ef6\u6388\u6743\u5177\u6709\u5173\u952e\u91cd\u8981\u6027\uff0c\u7528\u4ee5\u89c4\u5b9a\u7528\u6237\u5bf9\u7279\u5b9a\u6587\u4ef6\u7684\u5f15\u7528\u6743\u3002\u6bcf\u4e00\u4efd\u6587\u4ef6\u7686\u5177\u5907\u5404\u81ea\u7684\u6743\u9650\u8bbe\u5b9a\uff0c\u5305\u542b\u7740\u8bfb\u53d6\u3001\u5199\u5165\u4ee5\u53ca\u542f\u7528\u7b49\u591a\u4e2a\u5c42\u9762\u3002\u501f\u52a9\u4e8e\u7cbe\u5999\u5730\u5236\u5b9a\u6587\u4ef6\u6743\u9650\uff0c\u5c06\u6709\u52a9\u4e8e\u4fdd\u969c\u6574\u4e2a\u7cfb\u7edf\u7684\u5b89\u5168\u7a33\u5b9a\u6027\uff0c\u9632\u8303\u65e0\u6743\u8bbf\u95ee\u654f\u611f\u4fe1\u606f\u3002\u5728Linux\u73af\u5883\u4e0b\uff0c\u8fd0\u7528chmod\u6307\u4ee4\u4fbf\u53ef\u5b8c\u6210\u5bf9\u6587\u4ef6\u6743\u9650\u8bbe\u5b9a\u7684\u8c03\u6574\uff0c\u501f\u52a9\u8be5\u547d\u4ee4<\/a>\uff0c\u80fd\u591f\u9488\u5bf9\u6587\u4ef6\u6240\u6709\u4eba\u3001\u6240\u5c5e\u56e2\u961f\u53ca\u5176\u4ed6\u7528\u6237\u8fdb\u884c\u72ec\u7acb\u7684\u6743\u9650\u914d\u7f6e\u3002<\/p>\n

\u5728Linux\u73af\u5883\u4e0b\uff0c\u6bcf\u4efd\u6587\u6863\u7686\u914d\u5907\u4e00\u4e2a\u6240\u6709\u8005\u53ca\u6240\u5c5e\u5c0f\u7ec4\u3002\u6240\u6709\u8005\u5373\u4e3a\u5efa\u7acb\u6b64\u7269\u4ef6\u7684\u4f7f\u7528\u8005\uff1b\u5176\u6240\u5c5e\u5c0f\u7ec4\uff0c\u4ea6\u662f\u5bf9\u5e94\u7684\u7528\u6237\u7fa4\u3002\u6b64\u5916linux\u5e38\u7528\u547d\u4ee4\uff0c\u5c1a\u5b58\u5728\u5176\u4ed6\u7528\u6237\u7fa4\u4f53\u3002\u4f9d\u636e\u4e0a\u8ff0\u4e09\u91cd\u8eab\u4efd\uff0c\u4fbf\u53ef\u8bbe\u5b9a\u76f8\u5e94\u7684\u8bbf\u95ee\u8bb8\u53ef\u3002\u4f8b\u5982\uff0c\u8bfb\uff084\uff09\u3001\u5199\uff082\uff09\u4ee5\u53ca\u52a8\uff081\uff09\u7b49\u6743\u9650\uff0c\u5747\u53ef\u7528\u6570\u5b57\u4e88\u4ee5\u6807\u8bc6\u3002\u5982\u6b64\uff0c\u4fbf\u80fd\u4ee5\u4e09\u4f4d\u6570\u7684\u5f62\u5f0f\uff0c\u7cbe\u786e\u5730\u63cf\u8ff0\u5404\u7c7b\u7528\u6237\u5bf9\u6587\u6863\u7684\u8bbf\u95ee\u6743\u9650\u3002<\/p>\n

\u9664\u6b64\u4ee5\u5916\uff0cLinux\u7cfb\u7edf\u4e0b\u8fd8\u8bbe\u6709\u7279\u6b8a\u6743\u9650\u4f4ds(setuid)\u3001S(setgid)\u4e0et(stickybit)\u3002\u5176\u4e2d\uff0csetuid\u8d4b\u4e88\u666e\u901a\u7528\u6237\u4ee5\u7ba1\u7406\u5458\u8eab\u4efd\u8fd0\u884c\u7279\u5b9a\u7a0b\u5e8f\u7684\u6743\u529b\uff1bsetgid\u5219\u8d77\u5230\u5c06\u666e\u901a\u7528\u6237\u81ea\u52a8\u5f52\u5c5e\u5230\u76f8\u5e94\u7ec4\u4ece\u800c\u8fdb\u884c\u7a0b\u5e8f\u64cd\u4f5c\u7684\u4f5c\u7528\uff1b\u800cstickybit\u80fd\u6709\u6548\u963b\u6b62\u4ed6\u4eba\u5220\u9664\u5176\u4ed6\u7528\u6236\u6240\u5efa\u7acb\u4e4b\u6587\u4ef6\u3002<\/p>\n

\u57fa\u672c\u547d\u4ee4\u4ecb\u7ecd<\/b><\/p>\n

chmod\uff1a\u6b64\u6307\u4ee4\u4e3b\u8981\u7528\u4e8e\u8c03\u6574\u6587\u4ef6\u6743\u9650\u3002\u5229\u7528\u5b83\u53ef\u8bbe\u5b9a\u6587\u4ef6\u7684\u8bfb\u3001\u5199\u4e0e\u6267\u884c\u6743\u9650\u3002\u4ee5chmod777file.txt\u4e3a\u4f8b\uff0c\u8fd9\u610f\u5473\u7740\u8d4b\u4e88file.txt\u6587\u4ef6\u7684\u6240\u6709\u8005\u3001\u6240\u5c5e\u7ec4\u53ca\u5176\u4ed6\u7528\u6237\u5b8c\u5168\u63a7\u5236\uff08\u5373\u8bfb\u3001\u5199\u4e0e\u6267\u884c\uff09\u7684\u6743\u5229\u3002<\/p>\n

\u5229\u7528chown\u547d\u4ee4\u66f4\u6539\u6587\u4ef6\u7684\u62e5\u6709\u8005\u4e0e\u5f52\u5c5e\u7ec4\uff1a\u4f8b\u5982\uff0c\u53ef\u501f\u52a9\u547d\u4ee4\"chownuser:groupfile.txt\"\uff0c\u5c06\"file.txt\"\u7684\u6240\u6709\u8005\u66f4\u6539\u4e3a\"user\"linux \u6587\u4ef6\u6388\u6743<\/strong>\uff0c\u5e76\u5c06\u5176\u5f52\u5c5e\u7ec4\u53d8\u66f4\u4e3a\"group\"\u3002<\/p>\n

\u5229\u7528chgrp\u6307\u4ee4\uff1a\u8be5\u6307\u4ee4\u53ef\u5bf9\u6587\u4ef6\u6240\u5c5e\u7ec4\u8fdb\u884c\u8c03\u6574\u3002\u4f8b\u5982\uff0c\u4f7f\u7528chgrpgroupfile.txt\u4fbf\u80fd\u5c06file.txt\u6587\u4ef6\u7684\u6240\u5c5e\u7ec4\u66f4\u6539\u4e3agroup\u3002<\/p>\n

ls\u6307\u4ee4\uff1a\u6b64\u547d\u4ee4\u4e3b\u8981\u7528\u4ee5\u5c55\u793a\u76ee\u5f55\u4e0b\u7684\u6587\u6863\u8be6\u5355\u53ca\u76f8\u5173\u7279\u6027\u3002\u4f8b\u5982\uff0c\u501f\u52a9ls-l\u53c2\u6570\u53ef\u83b7\u53d6\u5230\u66f4\u4e3a\u4e30\u5bcc\u7684\u4fe1\u606f\uff0c\u5982\u6587\u6863\u6743\u9650\u3001\u6240\u6709\u4eba\u3001\u6240\u5c5e\u7fa4\u7ec4\u7b49\u3002<\/p>\n

\u6388\u6743\u6587\u4ef6\u8fc7\u671f_linux \u6587\u4ef6\u6388\u6743_\u6388\u6743\u6587\u4ef6\u82f1\u6587<\/p>\n

\u5e38\u89c1\u95ee\u9898\u89e3\u51b3<\/b><\/p>\n

\u547d\u4ee4\u65e0\u6548:\u82e5\u67d0\u6267\u884c\u6587\u4ef6\u65e0\u6cd5\u8fd0\u884c\uff0c\u53ef\u80fd\u7531\u4e8e\u65e0\u6267\u884c\u6743\u9650\u6240\u81f4\u3002\u501f\u52a9`chmod+xfilename`\u5373\u53ef\u8d4b\u4e88\u5176\u6267\u884c\u6743\u3002<\/p>\n

\u91cd\u8981\u6587\u4ef6\u906d\u53d7\u6076\u610f\u4fee\u6539\uff1a\u82e5\u5bdf\u89c9\u6709\u91cd\u8981\u6587\u4ef6\u906d\u7be1\u6539\u6216\u5220\u51cf\uff0c\u52a1\u5fc5\u7acb\u5373\u68c0\u67e5\u7cfb\u7edf\u5b89\u5168\u72b6\u51b5\uff0c\u5e76\u914c\u60c5\u9650\u5236\u5176\u4ed6\u4f7f\u7528\u8005\u5bf9\u6b64\u7c7b\u6587\u4ef6\u7684\u8bbf\u95ee\u6743\u9650\u3002<\/p>\n

\u9ad8\u7ea7\u6388\u6743\u7ba1\u7406<\/b><\/p>\n

\u9664\u57fa\u7840\u7684chmod\u548cchown\u547d\u4ee4\u5916\uff0cLinux\u7cfb\u7edf\u8fd8\u62e5\u6709\u4e00\u7cfb\u5217\u9ad8\u7ea7\u6388\u6743\u7ba1\u7406\u5de5\u5177\uff0c\u5982\u652f\u6301\u7cbe\u7ec6\u6743\u9650\u7ba1\u7406\u7684ACL\u673a\u5236\uff0c\u5177\u5907\u5f3a\u5927\u4e0e\u7075\u6d3b\u6027\u5b89\u5168\u7b56\u7565\u7684SELinux\u4ee5\u53ca\u4e3a\u5e94\u7528\u7a0b\u5e8f\u5b89\u5168\u6027\u91cf\u8eab\u5b9a\u5236\u7684AppArmor\u3002<\/p>\n

ACL\u6280\u672f\u4e3a\u7ba1\u7406\u8005\u63d0\u4f9b\u4e86\u8bbe\u7acb\u66f4\u5177\u7075\u6d3b\u6027\u4e14\u591a\u6837\u5316\u8bbf\u95ee\u6743\u9650\u7684\u80fd\u529b\uff0c\u540c\u65f6\u4fdd\u7559\u539f\u59cb\u6240\u6709\u8005\u548c\u76f8\u5173\u6743\u5229\u4e0d\u53d7\u5f71\u54cd\u3002\u8fd9\u79cd\u529f\u80fd\u53ef\u4ee5\u8ba9\u7ba1\u7406\u8005\u6839\u636e\u7279\u6b8a\u8981\u6c42\u4e3a\u7279\u5b9a\u5bf9\u8c61\u5236\u5b9a\u4e13\u95e8\u7684\u8bbf\u95ee\u7b56\u7565\uff0c\u4ece\u800c\u6709\u6548\u5e94\u5bf9\u590d\u6742\u573a\u666f\u4e2d\u7684\u6570\u636e\u5b89\u5168\u4e0e\u8bbf\u95ee\u76d1\u7ba1\u95ee\u9898\u3002<\/p>\n

SELinux\u8fd0\u7528\u7075\u6d3b\u9ad8\u6548\u7684\u5b89\u5168\u7b56\u7565\u6846\u67b6\uff0c\u652f\u6301\u7ec6\u5316\u5236\u5b9a\u5404\u7c7b\u5b89\u5168\u89c4\u5b9alinux \u6587\u4ef6\u6388\u6743<\/strong>\uff0c\u786e\u4fdd\u7cfb\u7edf\u8d44\u6e90\u514d\u906d\u975e\u6cd5\u8bbf\u95ee\u548c\u7834\u574f\uff0c\u540c\u65f6\u5e94\u7528\u5f3a\u5236\u8bbf\u95ee\u63a7\u5236\uff08MAC\uff09\u653f\u7b56\u3002<\/p>\n

AppArmor\uff0c\u4f5c\u4e3a\u9002\u7528\u4e8e\u5e94\u7528\u7a0b\u5e8f\u7684\u5b89\u5168\u9632\u62a4\u5de5\u5177\uff0c\u81f4\u529b\u4e8e\u4e3a\u64cd\u4f5c\u7cfb\u7edf\u4ee5\u53ca\u5e94\u7528\u8f6f\u4ef6\u5efa\u7acb\u62b5\u5fa1\u6076\u610f\u8f6f\u4ef6\u653b\u51fb\u53ca\u5176\u6f5c\u5728\u98ce\u9669\u7684\u9632\u7ebf\u3002\u76f8\u8f83\u4e8eSELinux\uff0c\u5b83\u5177\u6709\u66f4\u7b80\u6613\u7684\u914d\u7f6e\u548c\u7ba1\u7406\u7279\u6027\u3002<\/p>\n

\u5b9e\u9645\u5e94\u7528\u573a\u666f<\/b><\/p>\n

\u670d\u52a1\u5668\u5b89\u5168\uff1a\u4f5c\u4e3a\u670d\u52a1\u5668\u7ba1\u7406\u7684\u6838\u5fc3\u5185\u5bb9\uff0c\u6587\u4ef6\u6388\u6743\u7684\u7cbe\u51c6\u8bbe\u5b9a\u5c24\u4e3a\u91cd\u8981\u3002\u7ba1\u7406\u5458\u5e94\u4f9d\u636e\u5404\u7c7b\u7528\u6237\u89d2\u8272\u5206\u914d\u76f8\u5e94\u7684\u8bbf\u95ee\u6743\u9650\uff0c\u4ee5\u4fdd\u969c\u673a\u5bc6\u4fe1\u606f\u7684\u4fdd\u5bc6\u6027\u3002<\/p>\n

\u7814\u53d1\u73af\u5883\u8981\u6c42\uff1a\u5728\u7814\u53d1\u8fc7\u7a0b\u4e2d\uff0c\u5fc5\u8981\u65f6\u5f00\u53d1\u8005\u9700\u8fd0\u884c\u5404\u7c7b\u811a\u672c\u53ca\u7a0b\u5e8f\u8fdb\u884c\u4ee3\u7801\u9a8c\u8bc1\uff0c\u6b64\u65f6\u52a1\u8bf7\u786e\u4fdd\u7a0b\u5e8f\u5177\u5907\u6267\u884c\u6240\u9700\u7684\u6743\u9650\u3002<\/p>\n

\u591a\u4eba\u534f\u540c\uff1a\u56e2\u961f\u534f\u4f5c\u573a\u666f\u4e0b\uff0c\u5408\u7406\u6388\u6743\u5171\u4eab\u9879\u76ee\u6587\u6863\u53ef\u663e\u8457\u63d0\u5347\u5de5\u4f5c\u6548\u7387\u53ca\u4fdd\u969c\u6570\u636e\u5b89\u5168\u3002<\/p>\n

linux \u6587\u4ef6\u6388\u6743_\u6388\u6743\u6587\u4ef6\u8fc7\u671f_\u6388\u6743\u6587\u4ef6\u82f1\u6587<\/p>\n

\u603b\u7ed3\u4e0e\u5c55\u671b<\/b><\/p>\n

\u672c\u7bc7\u6587\u7ae0\u6df1\u5ea6\u5256\u6790\u4e86Linux\u6587\u4ef6\u6388\u6743\u7ba1\u7406\u7684\u5404\u4e2a\u65b9\u9762\uff0c\u8986\u76d6\u4e86\u57fa\u7840\u6982\u5ff5\u3001\u5e38\u89c1\u95ee\u9898\u89e3\u7b54\u53ca\u9ad8\u7ea7\u6388\u6743\u7ba1\u7406\u7b49\u591a\u5c42\u6b21\u5185\u5bb9\u3002\u7406\u89e3\u5e76\u5408\u7406\u63a7\u5236\u6587\u4ef6\u6388\u6743\u5bf9\u4e8e\u4fdd\u969c\u7cfb\u7edf\u5b89\u5168\u81f3\u5173\u91cd\u8981\uff0c\u5728\u5b9e\u9645\u64cd\u4f5c\u8fc7\u7a0b\u4e2d\u9700\u5173\u6ce8\u7ec6\u8282\u5e76\u9075\u5faa\u884c\u4e1a\u6807\u51c6\u3002<\/p>\n

\u9274\u4e8e\u79d1\u6280\u8fdb\u6b65\u53ca\u5b89\u5168\u8981\u6c42\u65e5\u76ca\u589e\u957f\uff0c\u6211\u4eec\u575a\u4fe1Linux\u6587\u4ef6\u6388\u6743\u5c06\u65e5\u76ca\u667a\u80fd\u4e0e\u4fbf\u6377\uff0c\u4ece\u800c\u5728\u4fdd\u8bc1\u7cfb\u7edf\u5b89\u5168\u6027\u7684\u57fa\u7840\u4e0alinux \u5173\u673a\u547d\u4ee4\uff0c\u8fdb\u4e00\u6b65\u63d0\u9ad8\u7528\u6237\u4f53\u9a8c\u3002<\/p>\n

\u6211\u4eec\u671f\u5f85\u901a\u8fc7\u6b64\u6587\u4f7f\u60a8\u5bf9Linux\u6587\u4ef6\u6388\u6743\u7ba1\u7406\u6709\u66f4\u6df1\u5c42\u6b21\u7684\u7406\u89e3\uff0c\u540c\u65f6\u80fd\u5c06\u6240\u5b66\u5e94\u7528\u4e8e\u5b9e\u8df5\u64cd\u4f5c\u4e2d\u3002\u60a8\u662f\u5426\u66fe\u5728\u65e5\u5e38\u5de5\u4f5c\u4e2d\u78b0\u5230\u8fc7\u4e0eLinux\u6587\u4ef6\u6388\u6743\u6709\u5173\u7684\u7591\u96be\u6742\u75c7\uff1f\u8bf7\u968f\u65f6\u5206\u4eab\u60a8\u7684\u89c1\u89e3\u4e0e\u7ecf\u9a8c\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"

\u7406\u89e3Linux\u6587\u4ef6\u6388\u6743\u5982\u6b64\uff0c\u4fbf\u80fd\u4ee5\u4e09\u4f4d\u6570\u7684\u5f62\u5f0f\uff0c\u7cbe\u786e\u5730\u63cf\u8ff0\u5404\u7c7b\u7528\u6237\u5bf9\u6587\u6863\u7684\u8bbf\u95ee\u6743\u9650\u3002chmod\uff1a\u6b64\u6307\u4ee4\u4e3b\u8981\u7528\u4e8e\u8c03\u6574\u6587\u4ef6\u6743\u9650\u3002\u4f8b\u5982\uff0c\u501f\u52a9ls-l\u53c2\u6570\u53ef\u83b7\u53d6\u5230\u66f4\u4e3a\u4e30\u5bcc\u7684\u4fe1\u606f\uff0c\u5982\u6587\u6863\u6743\u9650\u3001\u6240\u6709\u4eba\u3001\u6240\u5c5e\u7fa4\u7ec4\u7b49\u3002\u7ba1\u7406\u5458\u5e94\u4f9d\u636e\u5404\u7c7b\u7528\u6237\u89d2\u8272\u5206\u914d\u76f8\u5e94\u7684\u8bbf\u95ee\u6743\u9650\uff0c\u4ee5\u4fdd\u969c\u673a\u5bc6\u4fe1\u606f\u7684\u4fdd\u5bc6\u6027\u3002<\/p>\n","protected":false},"author":1,"featured_media":290848,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[999],"class_list":["post-290847","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tougao","tag-999"],"acf":[],"_links":{"self":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/290847","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/comments?post=290847"}],"version-history":[{"count":0,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/290847\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/media\/290848"}],"wp:attachment":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/media?parent=290847"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/categories?post=290847"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/tags?post=290847"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}