{"id":282606,"date":"2023-09-12T20:05:30","date_gmt":"2023-09-12T12:05:30","guid":{"rendered":"https:\/\/lrxjmw.cn\/ryhszzwjdxxg.html"},"modified":"2023-09-12T20:05:30","modified_gmt":"2023-09-12T12:05:30","slug":"ryhszzwjdxxg","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/ryhszzwjdxxg.html","title":{"rendered":"root\u7528\u6237\u6240\u5728\u7ec42229\u6587\u4ef6\u5927\u5c0f\u4fee\u6539\u65e5\u671f\u6587\u4ef6"},"content":{"rendered":"
\u4f9d\u6b64\u4ee3\u8868\uff1a-\u7c7b\u578b\u6743\u96501\u94fe\u63a5root\u7528\u6237root\u7528\u6237\u6240\u5728\u7ec42229\u6587\u4ef6\u5927\u5c0f\u66f4\u6539\u65e5\u671f\u6587\u4ef6\u540d<\/p>\n
\u6ce8\uff1a<\/p>\n
d\u8868\u793a\u76ee\u5f55-\u8868\u793a\u6587\u4ef61\u94fe\u63a5\u6587\u4ef6b\u8bbe\u5907\u6587\u4ef6\uff08\u50a8\u5b58\u63d2\u53e3\u8bbe\u5907\uff09c\u8bbe\u5907\u6587\u4ef6\uff08\u9f20\u6807\u7b49\uff09<\/p>\n
\u6ce8\u610f\u89c2\u5bdf\u4e0a\u56fe<\/p>\n
\u6587\u4ef6\u7684\u6743\u9650\u754c\u5b9a\uff1a\u6587\u4ef6\u6240\u6709\u8005\uff0c\u6587\u4ef6\u6240\u5c5e\u7ec4\uff0c\u5176\u4ed6\u4eba<\/p>\n
rwx\u5206\u522b\u8868\u793a\u8bfb\uff0c\u5199\uff0c\u6267\u884c\u7684\u4e09\u4e2a\u6743\u9650\uff08\u6ca1\u6709\u6743\u9650-\uff09<\/p>\n
\u7b2c\u4e00\u7ec4\uff1arw-\u8868\u793a\u6240\u6709\u8005\u62e5\u6709\u8bfb\u5199\u6743\u9650\uff08\u9996\u884c-\u8868\u793a\u5b83\u662f\u4e00\u4e2a\u6587\u4ef6\uff09<\/p>\n
\u7b2c\u4e8c\u7ec4\uff1ar--\u6240\u5c5e\u7ec4\u62e5\u6709\u8bfb\u7684\u6743\u9650<\/p>\n
\u7b2c\u4e09\u7ec4\uff1ar--\u5176\u4ed6\u4eba\u62e5\u6709\u8bfb\u7684\u6743\u9650<\/p>\n
\u76ee\u5f55\u6743\u9650<\/p>\n
r\u4ee3\u8868\u53ef\u4ee5\u8bfb\u53d6\u8be5\u76ee\u5f55\uff0c\u53ef\u77e5\u8be5\u76ee\u5f55\u4e0b\u62e5\u6709\u4ec0\u4e48\u6587\u4ef6<\/p>\n
w\u53ef\u4ee5\u521b\u5efa\u6216\u5219\u91cd\u547d\u540d\u76ee\u5f55linux\u6587\u4ef6\u6267\u884c\u6743\u9650<\/strong>\uff0c\u65b0\u5efa\u6587\u4ef6\uff0c\u8054\u901a\u8be5\u76ee\u5f55\u4e0b\u7684\u76ee\u5f55\u6587\u4ef6\u6216\u5219\u4f4d\u7f6e<\/p>\n x\u8868\u793a\u662f\u5426\u53ef\u4ee5\u6b65\u5165\u8be5\u76ee\u5f55<\/p>\n \u5173\u4e8e\u6587\u4ef6\u6743\u9650\u7684\u66f4\u6539<\/p>\n chown\u66f4\u6539\u6587\u4ef6\u7684\u6240\u6709\u8005\uff08\u5b58\u5728\u8be5\u7528\u6237\uff09chown\u7528\u6237\u6587\u4ef6\/\u76ee\u5f55-r\u9012\u5f52\u66f4\u6539<\/p>\n <\/p>\n chgrp\u66f4\u6539\u6587\u4ef6\u6240\u5c5e\u7ec4\uff08\u5b58\u5728\u8be5\u7ec4\uff09-r\u9012\u5f52\u66f4\u6539<\/p>\n <\/p>\n chmod\u66f4\u6539\u62e5\u6709\u7684\u6743\u9650\uff08u\/g\/o\uff09<\/p>\n \u7ed9\u6587\u4ef6123\u6240\u5c5e\u7ec4\u964d\u4f4e\u5199\u548c\u6267\u884c\u7684\u6743\u9650<\/p>\n <\/p>\n \u7ed9\u6587\u4ef6\u62e5\u6709\u7740\u5220\u6389\u5199\u7684\u6743\u9650<\/p>\n <\/p>\n \u7ed9\u6587\u4ef6\u5176\u4ed6\u4eba\u964d\u4f4e\u5199\u5165\uff0c\u548c\u6267\u884c\u7684\u6743\u9650<\/p>\n <\/p>\n \u6570\u5b57\u6cd5\uff1ar=4w=2x=1<\/p>\n <\/p>\n <\/p>\n \u793a\u4f8b\uff0c\u4f7f\u7528\u666e\u901a\u7528\u6237\u521b\u5efa\u4e00\u4e2a\u6587\u4ef6a\u4e4b\u540e\u4f7f\u7528\u8d85\u7ea7\u7528\u6237\u5220\u6389\u5176\u62e5\u6709\u7740\u7684\u5199\u5165\u6743\u9650\uff0c\u5256\u6790\uff0c\u5f53\u6211\u4eec\u518d\u5ea6\u4f7f\u7528\u666e\u901a\u7528\u6237\u662f\u5426\u53ef\u4ee5\u7f16\u8f91\u6b64\u6587\u4ef6a\u5462\uff1f<\/p>\n <\/p>\n \u6d4b\u8bd5\uff1a\u4ecd\u7136\u53ef\u4ee5\u5199\u5165\u6587\u4ef6<\/p>\n <\/p>\n \u7531\u6b64\u53ef\u77e5\u6587\u4ef6\u7684\u62e5\u6709\u8005\u867d\u7136\u6ca1\u6709\u62e5\u6709\u5199\u5165\u6743\u9650\u4e5f\u53ef\u4ee5\u5199\u5165\u5185\u5bb9\uff0c\u5e76\u4e14\u6587\u4ef6\u7684\u6240\u5c5e\u7ec4\u6216\u5219\u5176\u4ed6\u4eba\u5219\u4e0d\u884c\u3002<\/p>\n \u5c06\u7528\u6237\u52a0\u5165\u5230\u67d0\u7ec4\u6216\u5219\u4ece\u67d0\u7ec4\u5220\u6389gpasswd-agpasswd-d<\/p>\n <\/p>\n \u521b\u5efa\u67d0\u7ec4groupadd\u67e5\u770b\u7528\u6237\u6240\u5728\u7ec4groups<\/p>\n <\/p>\n \u793a\u4f8b\uff0c\u4f7f\u7528\u8d85\u7ea7\u7528\u6237\u521b\u5efa\u4e00\u4e2a\u76ee\u5f55a\uff0c\u4fee\u6539\u5176\u62e5\u6709\u7740\u4e3a\u666e\u901a\u7528\u6237wml\uff0c\u4e4b\u540e\u5220\u6389\u5b83\u5168\u90e8\u7684\u6743\u9650000<\/p>\n <\/p>\n \u4f7f\u7528\u666e\u901a\u5e10\u6237wml\u67e5\u770b\uff0c\u6b65\u5165\u8be5\u76ee\u5f55a<\/p>\n <\/p>\n <\/p>\n \u793a\u4f8b\uff0c\u5728\u4e0a\u4e2a\u4e8b\u4f8b\u4e2da\u76ee\u5f55\u4e0b\u521b\u5efa\u4e09\u4e2a\u6587\u4ef6bcd\u4e4b\u540e\u7ed9\u666e\u901a\u7528\u6237\u964d\u4f4e\u8bfb\u7684\u6743\u9650r\u4f7f\u7528\u666e\u901a\u5e10\u6237\u67e5\u770b\u6b64\u76ee\u5f55a<\/p>\n <\/p>\n \u53ef\u4ee5\u89c1\u5230\u6709\u4ec0\u4e48\u6587\u4ef6\u3002<\/p>\n \u964d\u4f4e\u6743\u9650\u6267\u884cx<\/p>\n <\/p>\n \u5c1d\u8bd5\u5728\u8be5\u76ee\u5f55\u4e0b\u521b\u5efa\u6587\u4ef6elinux\u6587\u4ef6\u6267\u884c\u6743\u9650<\/strong>\uff0c\u663e\u793a\u6743\u9650\u4e0d\u591f<\/p>\n \u9ed8\u8ba4\u6743\u9650umask<\/p>\n \u7b2c\u4e00\u4e2a0\u8868\u793a\u7279\u6b8a\u6743\u9650<\/p>\n 002=rwxrwx-wx(2\u4ee3\u8868\u5199\u5165\u6743\u9650\u8fd9\u513f2\u53ea\u6ca1\u6709\u8be5\u5199\u5165\u6743\u9650)<\/p>\n 022=rwxr-xr-x<\/p>\n \u793a\u4f8b\uff1a\u4f7f\u7528\u9ed8\u8ba4\u6743\u9650\u521b\u5efa\u6587\u4ef6\u548c\u76ee\u5f550022\u76ee\u5f55\u7684\u6743\u9650\u548c\u6211\u4eec\u610f\u6599\u7684\u662f\u4e00\u6837\u7684\uff0c\u4f46\u6587\u4ef6\u5374\u5c11\u4e86x\u6743\u9650\u8fd9\u662f\u7531\u4e8e\u5728\u521b\u5efa\u6587\u4ef6\u7684\u65f6\u4faflinux\u7248qq\uff0c\u7cfb\u7edf<\/a>\u4f1a\u624b\u52a8\u53d6\u8d70x\u6743\u9650\u3002\u6240\u4ee5rw-r--r--<\/p>\n <\/p>\n \u793a\u4f8b\uff1a\u5047\u5b9a\u6211\u4eec\u54ea\u4e9b\u6743\u9650\u90fd\u4e0d\u53d6\u8d70umask000\uff0c\u540c\u6837\u521b\u5efa\u6587\u4ef6a\u548c\u76ee\u5f55b<\/p>\n <\/p>\n \u6062\u590d\u9ed8\u8ba4\u6743\u9650\uff0c\u6ce8\uff1a\u6ca1\u4e8b\u4e0d\u8981\u968f\u610f\u8c03\u6574\u9ed8\u8ba4\u503c\u3002<\/p>\n umask0000\u662f\u4e34\u65f6\u66f4\u6539\uff0c\u6c38\u4e45\u66f4\u6539\u987b\u8981\u5728\/etc\/bashrc\u66f4\u6539(\u6ce8\uff1a\u522b\u4e71\u8dd1\u8fd9\u4e2a\u6587\u4ef6)<\/p>\n <\/p>\n linux\u7528\u6237\u7ba1\u7406<\/p>\n 1.etc\/passwd\u8bb0\u5f55linux\u6240\u6709\u5e10\u53f7<\/p>\n \u521d\u671fx\u4ee3\u8868\u7528\u6237\u7684\u767b\u5f55\u5bc6\u7801\uff0c\u5982\u4eca\u653e\u5728shadow\u6587\u4ef6\u4e2d\uff0cUID\uff1a0\u4ee3\u8868\u7cfb\u7edf\u7ba1\u7406\u5458GID\uff1a0\uff0c\u5047\u5982\u6211\u4eec\u628ahxh\u8fd9\u884c1000\u6539\u62100\u5219hxh\u5c31\u5f04\u6210\u4e86\u7cfb\u7edf\u7ba1\u7406\u5458\u30020-999\u4f9b\u7cfb\u7edf\u4f7f\u75281000\u4ee5\u4e0a\u7ed9\u4f7f\u7528\u8005<\/p>\n