{"id":295098,"date":"2024-12-21T04:05:11","date_gmt":"2024-12-20T20:05:11","guid":{"rendered":"https:\/\/lrxjmw.cn\/rhzlxtxcjyhb.html"},"modified":"2024-12-21T04:05:11","modified_gmt":"2024-12-20T20:05:11","slug":"rhzlxtxcjyhb","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/rhzlxtxcjyhb.html","title":{"rendered":"\u5982\u4f55\u5728Linux\u7cfb\u7edf\u4e0b\u521b\u5efa\u7528\u6237\u5e76\u8bbe\u7f6e\u53ea\u8bfb\u6743\u9650\uff1a\u8be6\u7ec6\u6307\u5357\u4e0e\u64cd\u4f5c\u6b65\u9aa4"},"content":{"rendered":"

\u968f\u7740\u8ba1\u7b97\u673a\u6280\u672f\u7684\u4e0d\u65ad\u53d1\u5c55\uff0cLinux<\/a>\u64cd\u4f5c\u7cfb\u7edf\u65e9\u5df2\u6210\u4e3a\u4e86\u597d\u591a\u4f01\u4e1a\u548c\u4e2a\u4eba\u4f7f\u7528\u7684\u91cd\u8981\u5e73\u53f0\u3002\u5728Linux<\/a>\u7cfb\u7edf\u4e0b\uff0c\u7528\u6237\u7684\u521b\u5efa\u548c\u6743\u9650\u7684\u8bbe\u7f6e\u662f\u5341\u5206\u91cd\u8981\u7684\uff0c\u7531\u4e8e\u8fd9\u5173\u7cfb\u5230\u4e86\u7cfb\u7edf\u4f7f\u7528\u7684\u5b89\u5168\u6027\u548c\u8fd0\u884c\u7684\u7a33\u5b9a\u6027\u3002\u672c\u6587\u5c06\u4e3a\u4f60\u4eec\u4ecb\u7ecd\u600e\u6837\u5728Linux\u7cfb\u7edf\u4e0b\u521b\u5efa\u7528\u6237\u548c\u8bbe\u7f6e\u53ea\u8bfb\u6743\u9650\u3002<\/p>\n

\u4e00\u3001\u521b\u5efa\u7528\u6237<\/p>\n

\u5728Linux\u7cfb\u7edf\u4e2d\uff0c\u521b\u5efa\u7528\u6237\u7684\u547d\u4ee4<\/a>\u662fuseradd\uff0c\u5177\u4f53\u7684\u53e5\u578b\u683c\u5f0f\u5982\u4e0b\uff1a<\/p>\n

useradd[-uuid][-ginitial_group][-Ggroup[,\u2026]][-dhome_dir][-sshell][-ccomment][-m[-ktemplate]][-finactive][-eexpire][-L[UC]|[-]password]username<\/p>\n

\u5176\u4e2d\uff0c\u5404\u4e2a\u9009\u9879\u7684\u6db5\u4e49\u5982\u4e0b\uff1a<\/p>\n

1.-uuid\uff1a\u6307\u5b9a\u7528\u6237\u7684UID\uff0c\u8fd9\u4e2aUID\u5fc5\u987b\u662f\u60df\u4e00\u7684\uff0c\u4e14\u4e0d\u80fd\u548c\u5176\u5b83\u7528\u6237\u6216\u7ec4\u7684UID\u76f8\u540c\uff1b<\/p>\n

2.-ginitial_group\uff1a\u6307\u5b9a\u7528\u6237\u6240\u5c5e\u7684\u4e3b\u7ec4\uff1b<\/p>\n

3.-Ggroup[,\u2026]\uff1a\u6307\u5b9a\u7528\u6237\u6240\u5c5e\u7684\u9644\u52a0\u7ec4\uff1b<\/p>\n

4.-dhome_dir\uff1a\u6307\u5b9a\u7528\u6237\u7684\u4e3b\u76ee\u5f55\uff1b<\/p>\n

5.-sshell\uff1a\u6307\u5b9a\u7528\u6237\u7684\u9ed8\u8ba4shell\uff1b<\/p>\n

6.-ccomment\uff1a\u6307\u5b9a\u7528\u6237\u7684\u6ce8\u91ca\u4fe1\u606f\uff1b<\/p>\n

7.-m[-ktemplate]\uff1a\u521b\u5efa\u7528\u6237\u7684\u4e3b\u76ee\u5f55\uff0c\u5047\u5982\u4e3b\u76ee\u5f55\u65e9\u5df2\u5b58\u5728\u5219\u4e0d\u4f1a\u91cd\u65b0\u521b\u5efa\uff0c-k\u9009\u9879\u53ef\u4ee5\u6307\u5b9a\u8981\u590d\u5236\u7684\u76ee\u5f55\uff1b<\/p>\n

8.-finactive\uff1a\u6307\u5b9a\u7528\u6237\u672a\u767b\u5165\u591a\u957f\u65f6\u95f4\u540e\u5c31\u88ab\u9501\u5b9a\uff1b<\/p>\n

9.-eexpire\uff1a\u6307\u5b9a\u7528\u6237\u7684\u5e10\u53f7\u5931\u6548\u65e5\u671f\uff1b<\/p>\n

10.-L[UC]|[-]password\uff1a\u9501\u5b9a\u7528\u6237\u7684\u5bc6\u7801\u3002<\/p>\n

\u6bd4\u5982\uff0c\u6211\u4eec\u8981\u521b\u5efa\u4e00\u4e2a\u540d\u4e3azhangsan\u7684\u7528\u6237\uff0c\u5219\u53ef\u4ee5\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

useraddzhangsan<\/p>\n

\u521b\u5efa\u5b8c\u6210\u540e\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u67e5\u770b\u65b0\u521b\u5efa\u7684\u7528\u6237\u7684\u4fe1\u606f\uff1a<\/p>\n

idzhangsan<\/p>\n

\u4e8c\u3001\u53ea\u8bfb\u6743\u9650\u8bbe\u7f6e<\/p>\n

\u5728Linux\u7cfb\u7edf\u4e2d\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528chmod\u547d\u4ee4\u6765\u8bbe\u7f6e\u6587\u4ef6\u548c\u76ee\u5f55\u7684\u6743\u9650\u3002\u5176\u4e2dlinux\u8d4b\u4e88\u7528\u6237\u8bfb\u5199\u6743\u9650<\/strong>\uff0c\u53ea\u8bfb\u6743\u9650\u7684\u4ee3\u7801\u662f4\uff0c\u5177\u4f53\u7684\u53e5\u578b\u683c\u5f0f\u5982\u4e0b\uff1a<\/p>\n

chmod[who][+|-|=][mode][file\/dir]<\/p>\n

\u5176\u4e2d\uff0c\u5404\u4e2a\u9009\u9879\u7684\u542b\u610f\u5982\u4e0b\uff1a<\/p>\n

1.who\uff1a\u8868\u793a\u4f5c\u7528\u7684\u5bf9\u8c61\uff0c\u53ef\u4ee5\u662fu\uff08\u7528\u6237\uff09\u3001g\uff08\u7528\u6237\u7ec4\uff09\u6216o\uff08\u5176\u5b83\u7528\u6237\uff09\uff0c\u4e5f\u53ef\u4ee5\u662fa\uff08\u6240\u6709\u4eba\uff09\uff1b<\/p>\n

2.+|-|=\uff1a\u8868\u793a\u64cd\u4f5c\u7684\u6743\u9650\uff0c+\u8868\u793a\u6dfb\u52a0\u6743\u9650linux\u547d\u4ee4\u8be6\u89e3\u8bcd\u5178\uff0c-\u8868\u793a\u5220\u6389\u6743\u9650\uff0c=\u8868\u793a\u8d4b\u4e8e\u6743\u9650\uff1b<\/p>\n

3.mode\uff1a\u8868\u793a\u8981\u8bbe\u7f6e\u7684\u6743\u9650\uff0c\u53ef\u4ee5\u662fr\uff08\u8bfb\u53d6\uff09\u3001w\uff08\u5199\u5165\uff09\u6216x\uff08\u6267\u884c\uff09\uff0c\u4e5f\u53ef\u4ee5\u662f\u6570\u5b57\uff0c\u8868\u793a\u5177\u4f53\u7684\u6743\u9650\u503c\uff1b<\/p>\n

4.file\/dir\uff1a\u8868\u793a\u8981\u8bbe\u7f6e\u6743\u9650\u7684\u6587\u4ef6\u6216\u76ee\u5f55\u3002<\/p>\n

\u6bd4\u5982\uff0c\u6211\u4eec\u8981\u5c06\u6587\u4ef6file.txt\u7684\u6743\u9650\u8bbe\u7f6e\u4e3a\u53ea\u8bfb\uff0c\u53ef\u4ee5\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

chmodu-wfile.txt<\/p>\n

\u8fd9\u4e2a\u547d\u4ee4\u7684\u542b\u610f\u662f\uff0c\u5c06\u6587\u4ef6file.txt\u7684\u7528\u6237\u6743\u9650\uff08\u5373owner\u6743\u9650\uff09\u7684\u5199\u5165\u6743\u9650\uff08w\uff09\u9664\u53bb\uff0c\u56e0\u800c\u4f7f\u8fd9\u4e2a\u6587\u4ef6\u53ea\u624d\u80fd\u88ab\u8bfb\u53d6\u3002<\/p>\n

\u4e09\u3001\u6279\u91cf\u8bbe\u7f6e\u53ea\u8bfb\u6743\u9650<\/p>\n

\u5047\u5982\u6211\u4eec\u987b\u8981\u540c\u65f6\u5c06\u591a\u4e2a\u6587\u4ef6\u6216\u76ee\u5f55\u7684\u6743\u9650\u8bbe\u7f6e\u4e3a\u53ea\u8bfb\uff0c\u8fd9\u4e48\u5355\u72ec\u4f7f\u7528chmod\u547d\u4ee4\u4f3c\u4e4e\u4e0d\u592a\u4fbf\u6377\u3002\u5728\u8fd9\u4e9b\u60c5\u51b5\u4e0b\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528find\u547d\u4ee4\u6765\u67e5\u627e\u7b26\u5408\u6761\u4ef6\u7684\u6587\u4ef6\uff0c\u5e76\u4f7f\u7528xargs\u547d\u4ee4\u5c06\u5b83\u4eec\u4f20\u9012\u7ed9chmod\u547d\u4ee4\u3002\u5177\u4f53\u7684\u547d\u4ee4\u5982\u4e0b\uff1a<\/p>\n

find.-typef|xargschmodu-w<\/p>\n

\u8fd9\u4e2a\u547d\u4ee4\u7684\u542b\u610f\u662flinux\u64cd\u4f5c\u7cfb\u7edf\u4e0b\u8f7d\uff0c\u5148\u7528find\u547d\u4ee4\u67e5\u627e\u5f53\u524d\u76ee\u5f55\u4e0b\u7684\u6240\u6709\u6587\u4ef6\uff08-typef\uff09\uff0c\u4e4b\u540e\u5c06\u5b83\u4eec\u4f20\u9012\u7ed9xargs\u547d\u4ee4\uff0c\u5728xargs\u547d\u4ee4\u4e2d\u6267\u884cchmodu-w\u6765\u53bb\u9664\u5b83\u4eec\u7684\u7528\u6237\u5199\u5165\u6743\u9650\uff08u-w\uff09\u3002<\/p>\n

\u5728Linux\u7cfb\u7edf\u4e2d\uff0c\u7528\u6237\u7684\u521b\u5efa\u548c\u6743\u9650\u7684\u8bbe\u7f6e\u662f\u6781\u5176\u91cd\u8981\u7684\u3002\u672c\u6587\u4ecb\u7ecd\u4e86\u600e\u6837\u521b\u5efa\u7528\u6237\u5e76\u8bbe\u7f6e\u53ea\u8bfb\u6743\u9650\uff0c\u5e0c\u671b\u5bf9\u4f60\u4eec\u6709\u6240\u5e2e\u52a9\u3002\u540c\u65f6\uff0c\u6211\u4eec\u4e5f\u5f3a\u70c8\u5efa\u8bae\u4f60\u4eec\u5728\u4f7f\u7528Linux\u7cfb\u7edf\u65f6\uff0c\u4e00\u5b9a\u8981\u6ce8\u610f\u7cfb\u7edf\u7684\u5b89\u5168\u6027\u548c\u8fd0\u884c\u7684\u7a33\u5b9a\u6027\uff0c\u9632\u6b62\u4f55\u5fc5\u8981\u7684\u98ce\u9669\u548c\u95ee\u9898\u3002<\/p>\n

\u76f8\u5173\u95ee\u9898\u62d3\u5c55\u9605\u8bfb\uff1a<\/p>\n

\u600e\u6837\u5728Linux\u4e0b\u8bbe\u7f6e\u8bbf\u95ee\u63a7\u5236\u5217\u8868(ACL)\u6765\u63a7\u5236\u7528\u6237\u7684\u6743\u9650<\/p>\n

Linux\u4e0b\u7684\u8bbf\u95ee\u63a7\u5236\u5217\u8868\uff08ACL\uff09\u4e3b\u8981\u62ff\u6765\u63a7\u5236\u7528\u6237\u7684\u6743\u9650\uff0c\u53ef\u4ee5\u505a\u5230\u4e0d\u540c\u7528\u6237\u5bf9\u540c\u4e00\u6587\u4ef6\u6709\u4e0d\u540c\u7684\u6743\u9650\uff0c\u8fd9\u4e48\u5177\u4f53\u8981\u600e\u4e48\u64cd\u4f5c\u5462\uff1f\u4e0b\u8fb9\u5c0f\u7f16\u5c31\u6559\u4f60\u600e\u6837\u5728Linux\u4e0b\u8bbe\u7f6e\u8bbf\u95ee\u63a7\u5236\u5217\u8868\uff08ACL\uff09\u6765\u63a7\u5236\u7528\u6237\u7684\u6743\u9650\u3002<\/p>\n

\u4f7f\u7528\u62e5\u6709\u6743\u9650\u63a7\u5236\u7684Liunx\uff0c\u5de5\u4f5c\u662f\u4e00\u4ef6\u8f7b\u677e\u7684\u4efb\u52a1\u3002\u5b83\u53ef\u4ee5\u5b9a\u4e49\u4efb\u4f55user\uff0cgroup\u548cother\u7684\u6743\u9650\u3002\u65e0\u8bba\u662f\u5728\u684c\u9762\u7b14\u8bb0\u672c\u6216\u5219\u4e0d\u4f1a\u6709\u597d\u591a\u7528\u6237\u7684\u865a\u62dfLinux\u5b9e\u4f8b\uff0c\u6216\u5219\u5f53\u7528\u6237\u4e0d\u4e50\u610f\u5206\u4eab\u5979\u4eec\u4e4b\u95f4\u7684\u6587\u4ef6\u65f6\uff0c\u8fd9\u6837\u7684\u5de5\u4f5c\u662f\u5f88\u68d2\u7684\u3002\u4f46\u662f\uff0c\u5047\u5982\u4f60\u662f\u5728\u4e00\u4e2a\u5c0f\u578b\u7ec4\u7ec7\uff0c\u4f60\u8fd0\u884c\u4e86\u8fd0\u9882\u6bd5NFS\u6216\u5219Samba\u670d\u52a1\u7ed9\u4e0d\u540c\u7684\u7528\u6237\uff0c\u4e4b\u540e\u4f60\u5c06\u4f1a\u9700\u6a31\u7a3f\u8981\u7075\u6d3b\u7684\u9009\u8d2d\u5e76\u8bbe\u7f6e\u597d\u591a\u590d\u6742\u7684\u914d\u7f6e\u548c\u6743\u9650\u53bb\u6ee1\u8db3\u4f60\u7684\u7ec4\u7ec7\u4e0d\u540c\u7684\u9700\u6c42\u3002<\/p>\n

Linux\uff08\u548c\u5176\u4ed6Unix\u7b49POSIX\u517c\u5bb9\u7684\u64cd\u4f5c\u7cfb\u7edf\uff09\u6709\u4e00\u79cd\u88ab\u79f0\u4e3a\u8bbf\u95ee\u63a7\u5236\u5217\u8868\uff08ACL\uff09\u7684\u6743\u9650\u63a7\u5236\u65b9\u5f0f\uff0c\u5b83\u662f\u4e00\u79cd\u6743\u9650\u5206\u914d\u4e4b\u5916\u7684\u666e\u904d\u8303\u5f0f\u3002\u8bf8\u5982\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u4f60\u987b\u8981\u786e\u8ba43\u4e2a\u6743\u9650\u7ec4\uff1aowner\u3001group\u548cother\u3002\u800c\u4f7f\u7528ACL\uff0c\u4f60\u53ef\u4ee5\u964d\u4f4e\u6743\u9650\u7ed9\u5176\u4ed6\u7528\u6237\u6216\u7ec4\u522b\uff0c\u800c\u4e0d\u5355\u53ea\u662f\u7b80\u5355\u7684\u201cother\u201d\u6216\u8005\u662f\u62e5\u6709\u8005\u4e0d\u5b58\u5728\u7684\u7ec4\u522b\u3002\u53ef\u4ee5\u5bb9\u8bb8\u6307\u5b9a\u7684\u7528\u6237A\u3001B\u3001C\u62e5\u6709\u5199\u6743\u9650\u800c\u4e0d\u518d\u662f\u8ba9\u5979\u4eec\u6574\u4e2a\u7ec4\u62e5\u6709\u5199\u6743\u9650\u3002<\/p>\n

ACL\u652f\u6301\u591a\u79cdLinux\u6587\u4ef6\u7cfb\u7edf\uff0c\u5305\u62ecext2\uff0cext3\uff0cext4\uff0cXFS\uff0cBtfrs\uff0c\u7b49\u3002\u5047\u5982\u4f60\u4e0d\u786e\u5b9a\u4f60\u7684\u6587\u4ef6\u7cfb\u7edf\u662f\u5426\u652f\u6301ACL\uff0c\u8bf7\u53c2\u8003\u6587\u6863\u3002<\/p>\n

\u5728\u6587\u4ef6\u7cfb\u7edf\u4f7fACL\u751f\u6548<\/p>\n

\u9996\u5148\uff0c\u6211\u4eec\u987b\u8981\u5b89\u88c5\u5de5\u5177\u6765\u7ba1\u7406ACL\u3002<\/p>\n

Ubuntu\/Debian\u4e2d\uff1a<\/p>\n

$sudoapt-getinstallacl<\/p>\n

CentOS\/Fedora\/RHEL\u4e2d\uff1a<\/p>\n

#yum-yinstallacl<\/p>\n

Archlinux\u4e2d\uff1a<\/p>\n

#pacman-Sacl<\/p>\n

\u51fa\u4e8e\u6f14\u793a\u76ee\u7684\uff0c\u6211\u5c06\u4f7f\u7528ubuntuserver\u7248\u672c\uff0c\u5176\u4ed6\u7248\u672c\u7c7b\u4f3c\u3002<\/p>\n

\u5b89\u88c5ACL\u5b8c\u6210\u540e\uff0c\u987b\u8981\u6fc0\u6d3b\u6211\u4eecc\u76d8\u5206\u533a\u7684ACL\u529f\u80fd\uff0c\u8fd9\u6837\u6211\u4eec\u80fd\u591f\u4f7f\u7528\u5b83\u3002<\/p>\n

\u9996\u5148\uff0c\u6211\u4eec\u68c0\u6d4bACL\u529f\u80fd\u662f\u5426\u65e9\u5df2\u5f00\u542f\u3002<\/p>\n

$mount<\/p>\n

\u4f60\u53ef\u4ee5\u6ce8\u610f\u5230\uff0c\u6211\u7684root\u5206\u533a\u4e2dACL\u5c5e\u6027\u65e9\u5df2\u5f00\u542f\u3002\u4e07\u4e00\u4f60\u6ca1\u6709\u5f00\u542f\uff0c\u4f60\u987b\u8981\u7f16\u8f91\/etc\/fstab\u6587\u4ef6\uff0c\u5728\u4f60\u987b\u8981\u5f00\u542fACL\u7684\u5206\u533a\u7684\u9009\u9879\u524d\u964d\u4f4eacl\u6807\u8bb0\u3002<\/p>\n

\u5982\u4eca\u6211\u4eec\u987b\u8981\u91cd\u65b0\u6302\u8f7d\u5206\u533a\uff08\u6211\u559c\u6b22\u5b8c\u5168\u91cd\u542f\uff0c\u7531\u4e8e\u6211\u4e0d\u60f3\u9057\u5931\u6570\u636e\uff09\uff0c\u5047\u5982\u4f60\u5bf9\u65c1\u82b9\u5176\u5b83\u5206\u533a\u5f00\u542fACL\uff0c\u4f60\u5fc5\u987b\u4e5f\u91cd\u65b0\u6302\u8f7d\u5b83\u3002<\/p>\n

$sudomount\/-oremount<\/p>\n

\u5e72\u7684\u4e0d\u9519\uff01\u5982\u4eca\u6211\u4eec\u65e9\u5df2\u5728\u6211\u4eec\u7684\u7cfb\u7edf\u4e2d\u5f00\u542fACL\uff0c\u8ba9\u6211\u4eec\u5f00\u59cb\u548c\u5b83\u4e00\u8d77\u5de5\u4f5c\u3002<\/p>\n

ACL\u8303\u4f8b<\/p>\n

\u57fa\u7840ACL\u901a\u8fc7\u4e24\u6761\u547d\u4ee4\u7ba1\u7406\uff1asetfacl\u7528\u4e8e\u964d\u4f4e\u6216\u5219\u66f4\u6539ACL\uff0cgetfacl\u7528\u4e8e\u663e\u793a\u5206\u914d\u5b8c\u7684ACL\u3002\u8ba9\u6211\u4eec\u6765\u505a\u4e00\u4e9b\u6d4b\u8bd5\u3002<\/p>\n

\u6211\u521b\u5efa\u4e00\u4e2a\u76ee\u5f55\/shared\u7ed9\u4e00\u4e2a\u5047\u5b9a\u7684\u7528\u6237\uff0c\u540d\u53ebfreeuser<\/p>\n

$ls-lh\/<\/p>\n

\u6211\u60f3\u8981\u5206\u4eab\u8fd9\u4e2a\u76ee\u5f55\u7ed9\u5176\u4ed6\u4e24\u4e2a\u7528\u6237test\u548ctest2\uff0c\u4e00\u4e2a\u62e5\u6709\u5b8c\u6574\u6743\u9650\uff0c\u53e6\u4e00\u4e2a\u53ea\u6709\u8bfb\u6743\u9650\u3002<\/p>\n

\u9996\u5148\uff0c\u4e3a\u7528\u6237test\u8bbe\u7f6eACL\uff1a<\/p>\n

$sudosetfacl-mu:test:rwx\/shared<\/p>\n

\u5982\u4eca\u7528\u6237test\u53ef\u4ee5\u968f\u4fbf\u521b\u5efa\u6587\u4ef6\u5939\uff0c\u6587\u4ef6\u548c\u8bbf\u95ee\u5728\/shared\u76ee\u5f55\u4e0b\u7684\u4efb\u4f55\u5730\u65b9\u3002<\/p>\n

\u5982\u4eca\u6211\u4eec\u964d\u4f4e\u53ea\u8bfb\u6743\u9650\u7ed9\u7528\u6237test2\uff1a<\/p>\n

$sudosetfacl-mu:test2:rx\/shared<\/p>\n

\u6ce8\u610ftest2\u8bfb\u53d6\u76ee\u5f55\u987b\u8981\u6267\u884c\uff08x\uff09\u6743\u9650<\/p>\n

\u8ba9\u6211\u6765\u89e3\u91ca\u4e0bsetfacl\u547d\u4ee4\u683c\u5f0f\uff1a<\/p>\n

-m\u8868\u793a\u66f4\u6539ACL\u3002\u4f60\u53ef\u4ee5\u964d\u4f4e\u65b0\u7684\uff0c\u6216\u66f4\u6539\u5b58\u5728\u7684ACLu\uff1a\u8868\u793a\u7528\u6237\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528g\u6765\u8bbe\u7f6e\u7ec4\u6743\u9650test\u7528\u6237\u540d\uff1arwx\u987b\u8981\u8bbe\u7f6e\u7684\u6743\u9650\u3002<\/p>\n

\u5982\u4eca\u8ba9\u6211\u5411\u4f60\u5c55\u793a\u600e\u6837\u8bfb\u53d6ACL\uff1a<\/p>\n

$ls-lh\/shared<\/p>\n

\u4f60\u53ef\u4ee5\u6ce8\u610f\u5230\uff0c\u6b63\u5e38\u6743\u9650\u540e\u591a\u4e00\u4e2a+\u6807\u8bb0\u3002\u8fd9\u8868\u793aACL\u65e9\u5df2\u8bbe\u7f6e\u6210\u529f\u3002\u8981\u5177\u4f53\u770b\u4e00\u4e0bACL\uff0c\u6211\u4eec\u987b\u8981\u8fd0\u884c\uff1a<\/p>\n

$sudogetfacl\/shared<\/p>\n

\u6700\u540e\uff0c\u5047\u5982\u4f60\u987b\u8981\u79fb\u9664ACL\uff1a<\/p>\n

$sudosetfacl-xu:test\/shared<\/p>\n

\u5047\u5982\u4f60\u60f3\u8981\u7acb\u523b\u64e6\u9664\u6240\u6709ACL\u6761\u76ee\uff1a<\/p>\n

$sudosetfacl-b\/shared<\/p>\n

\u6700\u540e\uff0c\u5728\u8bbe\u7f6e\u4e86ACL\u6587\u4ef6\u6216\u76ee\u5f55\u5de5\u4f5c\u65f6\uff0ccp\u548cmv\u547d\u4ee4\u4f1a\u6539\u53d8\u8fd9\u79cd\u8bbe\u7f6e\u3002\u5728cp\u7684\u60c5\u51b5\u4e0b\uff0c\u987b\u8981\u6dfb\u52a0\u201cp\u201d\u53c2\u6570\u6765\u590d\u5236ACL\u8bbe\u7f6e\u3002\u5018\u82e5\u8fd9\u4e0d\u53ef\u884c\uff0c\u5b83\u5c06\u4f1a\u5c55\u793a\u4e00\u4e2a\u8b66\u544a\u3002mv\u9ed8\u8ba4\u8054\u901aACL\u8bbe\u7f6e\uff0c\u5047\u82e5\u8fd9\u4e5f\u4e0d\u53ef\u884c\uff0c\u5b83\u4e5f\u4f1a\u5411\u60a8\u5c55\u793a\u4e00\u4e2a\u8b66\u544a\u3002<\/p>\n

\u603b\u7ed3<\/p>\n

\u4f7f\u7528ACL\u8ba9\u5728\u4f60\u60f3\u8981\u5206\u4eab\u7684\u6587\u4ef6\u4e0a\u62e5\u6709\u66f4\u591a\u7684\u80fd\u529b\u548c\u63a7\u5236\uff0c\u975e\u5e38\u662f\u5728NFS\/Samba\u670d\u52a1\u3002\u636e\u6089\uff0c\u5047\u5982\u4f60\u7684\u4e3b\u7ba1\u5171\u4eab\u4e3b\u673a\uff0c\u8fd9\u4e2a\u5de5\u5177\u662f\u5fc5\u5907\u7684\u3002<\/p>\n

\u91cc\u9762\u5c31\u662fLinux\u4e0b\u8bbe\u7f6e\u8bbf\u95ee\u63a7\u5236\u5217\u8868\u6765\u63a7\u5236\u7528\u6237\u6743\u9650\u7684\u65b9\u5f0f\u4ecb\u7ecd\u4e86\uff0c\u7531\u4e8eACL\u7684\u914d\u7f6e\u548c\u4f7f\u7528\u8f83\u4e3a\u590d\u6742\uff0c\u521d\u5b66\u8005\u5728\u4f7f\u7528\u7684\u65f6\u4faf\u5bb9\u6613\u51fa\u73b0\u9519\u8bef\uff0c\u5e0c\u671b\u672c\u6587\u4ecb\u7ecd\u7684\u65b9\u5f0f\u624d\u80fd\u5e2e\u52a9\u5230\u4f60\u3002<\/p>\n

Linux\u5982\u4f55\u8bbe\u7f6e\u7528\u6237\u901a\u8fc7SFTP\u8bbf\u95ee\u76ee\u5f55\u7684\u6743\u9650<\/p>\n

Linux\u7cfb\u7edf\u4e2d\u7684\u6bcf\u4f4d\u6587\u4ef6\u548c\u76ee\u5f55\u90fd\u6709\u8bbf\u95ee\u8bb8\u53ef\u6743\u9650\uff0c\u7528\u5b83\u6765\u786e\u5b9a\u8c01\u53ef\u4ee5\u901a\u8fc7\u4f55\u79cd\u65b9\u6cd5\u5bf9\u6587\u4ef6\u548c\u76ee\u5f55\u8fdb\u884c\u8bbf\u95ee\u548c\u64cd\u4f5c\u3002<\/p>\n

\u6587\u4ef6\u6216\u76ee\u5f55\u7684\u8bbf\u95ee\u6743\u9650\u5206\u4e3a\u53ea\u8bfb\uff0c\u53ea\u5199\u548c\u53ef\u6267\u884c\u4e09\u79cd\u3002\u4ee5\u6587\u4ef6\u4e3a\u4f8b\uff0c\u53ea\u8bfb\u6743\u9650\u8868\u793a\u53ea\u5bb9\u8bb8\u8bfb\u5176\u5185\u5bb9\uff0c\u800c\u4e25\u7981\u5bf9\u5176\u505a\u4efb\u4f55\u7684\u4fee\u6539\u64cd\u4f5c\u3002\u53ef\u6267\u884c\u6743\u9650\u8868\u793a\u51c6\u8bb8\u5c06\u8be5\u6587\u4ef6\u4f5c\u4e3a\u4e00\u4e2a\u544a\u53cb\u7a0b\u5e8f\u6267\u884c\u3002\u6587\u4ef6\u88ab\u521b\u5efa\u65f6\uff0c\u6587\u4ef6\u6240\u6709\u8005\u624b\u52a8\u62e5\u6709\u5bf9\u8be5\u6587\u4ef6\u7684\u8bfb\u3001\u5199\u548c\u53ef\u6267\u884c\u6743\u9650\uff0c\u4ee5\u6613\u4e8e\u5bf9\u6587\u4ef6\u7684\u9605\u8bfb\u548c\u66f4\u6539\u3002\u7528\u6237\u4e5f\u53ef\u4f9d\u636e\u987b\u8981\u628a\u8bbf\u95ee\u6743\u9650\u8bbe\u7f6e\u4e3a\u987b\u8981\u7684\u4efb\u4f55\u656c\u53cb\u62cd\u7ec4\u5408\u3002<\/p>\n

\u6709\u4e09\u79cd\u4e0d\u540c\u7c7b\u578b\u7684\u7528\u6237\u53ef\u5bf9\u6587\u4ef6\u6216\u76ee\u5f55\u8fdb\u884c\u8bbf\u95ee\uff1a\u6587\u4ef6\u6240\u6709\u8005\uff0c\u540c\u7ec4\u7528\u6237\u3001\u5176\u4ed6\u7528\u6237\u3002\u6240\u6709\u8005\u901a\u5e38\u662f\u6587\u4ef6\u7684\u521b\u5efa\u8005\u3002\u6240\u6709\u8005\u53ef\u4ee5\u5bb9\u8bb8\u540c\u7ec4\u7528\u6237\u6709\u6743\u8bbf\u95ee\u6587\u4ef6\uff0c\u8fd8\u53ef\u4ee5\u5c06\u6587\u4ef6\u7684\u8bbf\u95ee\u6743\u9650\u8d4b\u4e8e\u7cfb\u7edf\u4e2d\u7684\u5176\u4ed6\u7528\u6237\u3002\u5728\u8fd9\u4e9b\u60c5\u51b5\u4e0b\uff0c\u7cfb\u7edf\u4e2d\u6bcf\u4e00\u4f4d\u7528\u6237\u90fd\u80fd\u8bbf\u95ee\u8be5\u7528\u6237\u62e5\u6709\u7684\u6587\u4ef6\u6216\u76ee\u5f55\u3002<\/p>\n

\u6bcf\u4e00\u6587\u4ef6\u6216\u76ee\u5f55\u7684\u8bbf\u95ee\u6743\u9650\u90fd\u6709\u4e09\u7ec4\uff0c\u6bcf\u7ec4\u7528\u4e09\u4f4d\u8868\u793a\uff0c\u5206\u522b\u4e3a\u6587\u4ef6\u5c5e\u4e3b\u7684\u8bfb\u3001\u5199\u548c\u6267\u884c\u6743\u9650\uff1b\u4e0e\u5c5e\u4e3b\u540c\u7ec4\u7684\u7528\u6237\u7684\u8bfb\u3001\u5199\u548c\u6267\u884c\u6743\u9650\uff1b\u7cfb\u7edf\u4e2d\u5176\u4ed6\u7528\u6237\u7684\u8bfb\u3001\u5199\u548c\u6267\u884c\u6743\u9650\u3002\u5f53\u7528ls-l\u547d\u4ee4\u663e\u793a\u6587\u4ef6\u6216\u76ee\u5f55\u7684\u8be6\u5c3d\u4fe1\u606f\u65f6\uff0c\u6700\u5de6\u4fa7\u7684\u4e00\u5217\u4e3a\u6587\u4ef6\u7684\u8bbf\u95ee\u6743\u9650\u3002\u8bf8\u5982\uff1a<\/p>\n

$ls-lsobsrc.tgz<\/p>\n

-rw-r\u2013r\u20131rootrootJu1l517:3lsobsrc.tgz<\/p>\n

\u6a2a\u7ebf\u4ee3\u8868\u7a7a\u8bb8\u53ef\u3002r\u4ee3\u8868\u53ea\u8bfb\uff0cw\u4ee3\u8868\u5199\uff0cx\u4ee3\u8868\u53ef\u6267\u884c\u3002\u6ce8\u610f\u8fd9\u513f\u5171\u670910\u4e2a\u4f4d\u7f6e\u3002\u4e4b\u4e00\u4e2a\u5b57\u7b26\u6307\u5b9a\u4e86\u6587\u4ef6\u7c7b\u578b\u3002\u5728\u4e00\u822c\u610f\u4e49\u4e0a\uff0c\u4e00\u4e2a\u76ee\u5f55\u4e5f\u662f\u4e00\u4e2a\u6587\u4ef6\u3002\u5047\u5982\u4e4b\u4e00\u4e2a\u5b57\u7b26\u662f\u6a2a\u7ebf\uff0c\u8868\u793a\u662f\u4e00\u4e2a\u975e\u76ee\u5f55\u7684\u6587\u4ef6\u3002\u5047\u5982\u662fd\uff0c\u8868\u793a\u662f\u4e00\u4e2a\u76ee\u5f55\u3002<\/p>\n

\u6bd4\u5982\uff1a<\/p>\n

\u2013rw-r\u2013r\u2013<\/p>\n

\u666e\u901a\u6587\u4ef6\u6587\u4ef6\u4e3b\u7ec4\u7528\u6237\u5176\u4ed6\u7528\u6237<\/p>\n

\u662f\u6587\u4ef6sobsrc.tgz\u7684\u8bbf\u95ee\u6743\u9650\uff0c\u8868\u793asobsrc.tgz\u662f\u4e00\u4e2a\u666e\u901a\u6587\u4ef6\uff1bsobsrc.tgz\u7684\u5c5e\u4e3b\u6709\u8bfb\u5199\u6743\u9650\uff1b\u4e0esobsrc.tgz\u5c5e\u4e3b\u540c\u7ec4\u7684\u7528\u6237\u53ea\u6709\u8bfb\u6743\u9650\uff1b\u5176\u4ed6\u7528\u6237\u4e5f\u53ea\u6709\u8bfb\u6743\u9650\u3002<\/p>\n

\u786e\u5b9a\u4e86\u4e00\u4e2a\u6587\u4ef6\u7684\u8bbf\u95ee\u6743\u9650\u540e\uff0c\u7528\u6237\u53ef\u4ee5\u501f\u52a9Linux\u7cfb\u7edf\u63d0\u4f9b\u7684chmod\u547d\u4ee4\u6765\u91cd\u65b0\u8bbe\u5b9a\u4e0d\u540c\u7684\u8bbf\u95ee\u6743\u9650\u3002\u4e5f\u53ef\u4ee5\u501f\u52a9chown\u547d\u4ee4\u6765\u4fee\u6539\u67d0\u4e2a\u6587\u4ef6\u6216\u76ee\u5f55\u7684\u6240\u6709\u8005\u3002\u501f\u52a9chgrp\u547d\u4ee4\u6765\u4fee\u6539\u67d0\u4e2a\u4eae\u7fa1\u6587\u4ef6\u6216\u76ee\u5f55\u7684\u7528\u6237\u7ec4\u3002<\/p>\n

\u4e0b\u8fb9\u5206\u522b\u5bf9\u90a3\u4e9b\u547d\u4ee4\u52a0\u4ee5\u4ecb\u7ecd\u3002<\/p>\n

linux\u521b\u5efa\u7528\u6237\u53ea\u8bfb\u6743\u9650\u8bbe\u7f6e\u7684\u4ecb\u7ecd\u5c31\u804a\u5230\u8fd9\u513f\u5427\uff0c\u8c22\u8c22\u4f60\u82b1\u65f6\u95f4\u9605\u8bfb\u672c\u7ad9\u5185\u5bb9linux\u8d4b\u4e88\u7528\u6237\u8bfb\u5199\u6743\u9650<\/strong>\uff0c\u66f4\u591a\u5173\u4e8elinux\u521b\u5efa\u7528\u6237\u53ea\u8bfb\u6743\u9650\u8bbe\u7f6e,Linux\u7528\u6237\u521b\u5efa\u53ca\u53ea\u8bfb\u6743\u9650\u8bbe\u7f6e\u624b\u518c,\u600e\u4e48\u5728Linux\u4e0b\u8bbe\u7f6e\u8bbf\u95ee\u63a7\u5236\u5217\u8868(ACL)\u6765\u63a7\u5236\u7528\u6237\u7684\u6743\u9650,Linux\u5982\u4f55\u8bbe\u7f6e\u7528\u6237\u901a\u8fc7SFTP\u8bbf\u95ee\u76ee\u5f55\u7684\u6743\u9650\u7684\u4fe1\u606f\u522b\u5fd8\u4e86\u5728\u672c\u7ad9\u8fdb\u884c\u67e5\u627e\u5594\u3002<\/p>\n

\u53f0\u6e7e\u670d\u52a1\u5668\u9996\u9009\u540e\u6d6a\u4e91\uff0c2H2G\u9996\u670810\u5143\u5f00\u901a\u3002<\/p>\n

\u540e\u6d6a\u4e91\uff08\uff09\u63d0\u4f9b\u7b80\u5355\u597d\u7528\uff0c\u4ef7\u94b1\u539a\u9053\u7684\u65b0\u52a0\u5761\/\u9a6c\u6765\u897f\u4e9a\u4e91\u670d\u52a1\u5668\u548c\u72ec\u7acb\u670d\u52a1\u5668\u3002IDC+ISP+ICP\u8d44\u8d28\u3002ARIN\u548cAPNIC\u4f1a\u5458\u3002\u6210\u719f\u6280\u672f\u56e2\u961f15\u5e74\u884c\u4e1a\u7ecf\u9a8c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u672c\u6587\u5c06\u4e3a\u5927\u5bb6\u4ecb\u7ecd\u5982\u4f55\u5728Linux\u7cfb\u7edf\u4e0b\u521b\u5efa\u7528\u6237\u548c\u8bbe\u7f6e\u53ea\u8bfb\u6743\u9650\u3002\u6587\u4ef6\u88ab\u521b\u5efa\u65f6\uff0c\u6587\u4ef6\u6240\u6709\u8005\u81ea\u52a8\u62e5\u6709\u5bf9\u8be5\u6587\u4ef6\u7684\u8bfb\u3001\u5199\u548c\u53ef\u6267\u884c\u6743\u9650\uff0c\u4ee5\u4fbf\u4e8e\u5bf9\u6587\u4ef6\u7684\u9605\u8bfb\u548c\u4fee\u6539\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[109,5069,5068,5070,2779],"class_list":["post-295098","post","type-post","status-publish","format-standard","hentry","category-tougao","tag-linux","tag-operation-steps","tag-read-only","tag-system-administration","tag-u-14"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/295098","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=295098"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/295098\/revisions"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=295098"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=295098"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=295098"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}