{"id":47299,"date":"2025-07-30T07:17:13","date_gmt":"2025-07-29T23:17:13","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/47299.html"},"modified":"2025-07-30T07:17:13","modified_gmt":"2025-07-29T23:17:13","slug":"%e3%80%90%e6%9c%8d%e5%8a%a1%e5%99%a8%e4%b8%8e%e9%83%a8%e7%bd%b2-33%e3%80%91linux%e7%94%a8%e6%88%b7%e6%9d%83%e9%99%90%e7%ae%a1%e7%90%86%e5%ae%9e%e6%88%98%ef%bc%9a%e4%bb%8e%e9%9b%b6%e6%8e%8c%e6%8f%a1","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/47299.html","title":{"rendered":"\u3010\u670d\u52a1\u5668\u4e0e\u90e8\u7f72 33\u3011Linux\u7528\u6237\u6743\u9650\u7ba1\u7406\u5b9e\u6218\uff1a\u4ece\u96f6\u638c\u63e1\u7528\u6237\u4e0e\u7ec4\u914d\u7f6e\u8ba9\u670d\u52a1\u5668\u5b89\u5168\u65e0\u5fe7"},"content":{"rendered":"<h2>Linux\u7528\u6237\u6743\u9650\u7ba1\u7406\u5b9e\u6218&#xff1a;\u4ece\u96f6\u638c\u63e1\u7528\u6237\u4e0e\u7ec4\u914d\u7f6e\u8ba9\u670d\u52a1\u5668\u5b89\u5168\u65e0\u5fe7<\/h2>\n<p>\u5173\u952e\u8bcd&#xff1a;Linux\u6743\u9650\u7ba1\u7406\u3001\u7528\u6237\u7ec4\u914d\u7f6e\u3001chmod\u3001chown\u3001sudo\u3001\u6587\u4ef6\u6743\u9650\u3001ACL\u3001\u5b89\u5168\u7b56\u7565\u3001\u6700\u5c0f\u6743\u9650\u539f\u5219\u3001\u6743\u9650\u6a21\u578b<\/p>\n<p>\u6458\u8981&#xff1a;\u672c\u6587\u8be6\u7ec6\u4ecb\u7ecdLinux\u7cfb\u7edf\u4e2d\u7528\u6237\u4e0e\u7ec4\u6743\u9650\u914d\u7f6e\u7684\u6838\u5fc3\u6982\u5ff5\u4e0e\u5b9e\u8df5\u6280\u5de7\u3002\u4ece\u6743\u9650\u6a21\u578b\u57fa\u7840\u5230\u9ad8\u7ea7\u8bbf\u95ee\u63a7\u5236\u5217\u8868(ACL)&#xff0c;\u4ece\u7528\u6237\u7ba1\u7406\u5230\u6743\u9650\u59d4\u6d3e&#xff0c;\u5168\u9762\u89e3\u6790\u5982\u4f55\u6784\u5efa\u5b89\u5168\u53ef\u9760\u7684\u591a\u7528\u6237\u73af\u5883\u3002\u901a\u8fc7\u5b9e\u9645\u6848\u4f8b\u548c\u6700\u4f73\u5b9e\u8df5&#xff0c;\u5e2e\u52a9\u5f00\u53d1\u8005\u548c\u7cfb\u7edf\u7ba1\u7406\u5458\u638c\u63e1\u6743\u9650\u7ba1\u7406\u6280\u80fd&#xff0c;\u6709\u6548\u9632\u8303\u5b89\u5168\u98ce\u9669&#xff0c;\u63d0\u5347\u7cfb\u7edf\u7a33\u5b9a\u6027\u3002<\/p>\n<\/p>\n<h4>\u6587\u7ae0\u76ee\u5f55<\/h4>\n<ul>\n<li>Linux\u7528\u6237\u6743\u9650\u7ba1\u7406\u5b9e\u6218&#xff1a;\u4ece\u96f6\u638c\u63e1\u7528\u6237\u4e0e\u7ec4\u914d\u7f6e\u8ba9\u670d\u52a1\u5668\u5b89\u5168\u65e0\u5fe7<\/li>\n<li>\n<ul>\n<li>1. \u6743\u9650\u6a21\u578b\u57fa\u7840&#xff1a;\u7406\u89e3Linux\u7684\u5b89\u5168\u54f2\u5b66<\/li>\n<li>\n<ul>\n<li>1.1 \u4e09\u7c7b\u7528\u6237\u8eab\u4efd<\/li>\n<li>1.2 \u4e09\u79cd\u57fa\u672c\u6743\u9650<\/li>\n<\/ul>\n<\/li>\n<li>2. \u7528\u6237\u4e0e\u7ec4\u7ba1\u7406&#xff1a;\u6784\u5efa\u8bbf\u95ee\u63a7\u5236\u7684\u57fa\u7840<\/li>\n<li>\n<ul>\n<li>2.1 \u7528\u6237\u7ba1\u7406\u57fa\u7840\u64cd\u4f5c<\/li>\n<li>2.2 \u7ec4\u7ba1\u7406\u4e0e\u7b56\u7565<\/li>\n<li>2.3 \u5b9e\u9645\u6848\u4f8b&#xff1a;\u5f00\u53d1\u56e2\u961f\u6743\u9650\u914d\u7f6e<\/li>\n<\/ul>\n<\/li>\n<li>3. \u6587\u4ef6\u6743\u9650\u7ba1\u7406&#xff1a;chmod\u4e0echown\u7684\u827a\u672f<\/li>\n<li>\n<ul>\n<li>3.1 \u7406\u89e3\u6743\u9650\u8868\u793a\u6cd5<\/li>\n<li>3.2 \u4fee\u6539\u6587\u4ef6\u6743\u9650<\/li>\n<li>3.3 \u4fee\u6539\u6587\u4ef6\u6240\u6709\u6743<\/li>\n<li>3.4 \u7279\u6b8a\u6743\u9650\u4f4d&#xff1a;\u63d0\u5347\u80fd\u529b\u4e0e\u5b89\u5168<\/li>\n<\/ul>\n<\/li>\n<li>4. \u9ad8\u7ea7\u8bbf\u95ee\u63a7\u5236&#xff1a;\u8d85\u8d8a\u4f20\u7edf\u6743\u9650\u6a21\u578b<\/li>\n<li>\n<ul>\n<li>4.1 \u8bbf\u95ee\u63a7\u5236\u5217\u8868(ACL)<\/li>\n<li>4.2 sudo\u4e0e\u6743\u9650\u59d4\u6d3e<\/li>\n<li>4.3 \u5b9e\u73b0\u6700\u5c0f\u6743\u9650\u539f\u5219<\/li>\n<\/ul>\n<\/li>\n<li>5. \u6743\u9650\u5ba1\u8ba1\u4e0e\u6545\u969c\u6392\u67e5<\/li>\n<li>\n<ul>\n<li>5.1 \u6743\u9650\u95ee\u9898\u8bca\u65ad<\/li>\n<li>5.2 \u6743\u9650\u5ba1\u8ba1\u5de5\u5177<\/li>\n<\/ul>\n<\/li>\n<li>6. \u5b9e\u9645\u5e94\u7528\u573a\u666f\u4e0e\u6700\u4f73\u5b9e\u8df5<\/li>\n<li>\n<ul>\n<li>6.1 Web\u670d\u52a1\u5668\u6743\u9650\u914d\u7f6e<\/li>\n<li>6.2 \u6570\u636e\u5e93\u670d\u52a1\u6743\u9650\u9694\u79bb<\/li>\n<li>6.3 Python\u5e94\u7528\u90e8\u7f72\u6743\u9650\u7b56\u7565<\/li>\n<\/ul>\n<\/li>\n<li>7. \u81ea\u52a8\u5316\u6743\u9650\u7ba1\u7406<\/li>\n<li>\n<ul>\n<li>7.1 \u4f7f\u7528Ansible\u81ea\u52a8\u5316\u6743\u9650\u914d\u7f6e<\/li>\n<li>7.2 \u6743\u9650\u6a21\u677f\u4e0e\u6807\u51c6\u5316<\/li>\n<\/ul>\n<\/li>\n<li>8. \u603b\u7ed3\u4e0e\u6700\u4f73\u5b9e\u8df5<\/li>\n<li>\u53c2\u8003\u8d44\u6599\u4e0e\u8fdb\u4e00\u6b65\u5b66\u4e60<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p> \u4f60\u662f\u5426\u66fe\u7ecf\u9047\u5230\u8fc7\u8fd9\u6837\u7684\u60c5\u51b5&#xff1a;\u90e8\u7f72\u5728Linux\u670d\u52a1\u5668\u4e0a\u7684\u5e94\u7528\u7a81\u7136\u65e0\u6cd5\u8bbf\u95ee\u67d0\u4e2a\u6587\u4ef6&#xff0c;\u62a5\u9519&#034;Permission denied&#034;&#xff1f;\u6216\u8005\u66f4\u7cdf\u7cd5\u7684\u662f&#xff0c;\u56e0\u4e3a\u6743\u9650\u8bbe\u7f6e\u4e0d\u5f53&#xff0c;\u5bfc\u81f4\u654f\u611f\u6570\u636e\u88ab\u672a\u6388\u6743\u7528\u6237\u8bbf\u95ee&#xff1f;\u5728\u591a\u4eba\u534f\u4f5c\u7684\u670d\u52a1\u5668\u73af\u5883\u4e2d&#xff0c;\u5982\u4f55\u65e2\u4fdd\u8bc1\u5404\u81ea\u5de5\u4f5c\u987a\u5229\u8fdb\u884c&#xff0c;\u53c8\u80fd\u4e25\u683c\u63a7\u5236\u8bbf\u95ee\u8fb9\u754c&#xff0c;\u662f\u6bcf\u4e2a\u7cfb\u7edf\u7ba1\u7406\u5458\u5fc5\u987b\u9762\u5bf9\u7684\u6311\u6218\u3002<\/p>\n<p>Linux\u7684\u7528\u6237\u4e0e\u7ec4\u6743\u9650\u7cfb\u7edf\u662f\u5176\u5b89\u5168\u67b6\u6784\u7684\u57fa\u77f3&#xff0c;\u638c\u63e1\u8fd9\u5957\u673a\u5236\u4e0d\u4ec5\u80fd\u89e3\u51b3\u65e5\u5e38\u8fd0\u7ef4\u4e2d\u7684\u6743\u9650\u95ee\u9898&#xff0c;\u66f4\u80fd\u4ece\u6839\u672c\u4e0a\u63d0\u5347\u7cfb\u7edf\u7684\u5b89\u5168\u6027\u3002\u672c\u6587\u5c06\u5e26\u4f60\u4ece\u96f6\u5f00\u59cb&#xff0c;\u5168\u9762\u638c\u63e1Linux\u6743\u9650\u7ba1\u7406\u7684\u7cbe\u9ad3\u3002<\/p>\n<h3>1. \u6743\u9650\u6a21\u578b\u57fa\u7840&#xff1a;\u7406\u89e3Linux\u7684\u5b89\u5168\u54f2\u5b66<\/h3>\n<p>\u5728\u6df1\u5165\u5177\u4f53\u64cd\u4f5c\u524d&#xff0c;\u6211\u4eec\u9700\u8981\u5148\u7406\u89e3Linux\u6743\u9650\u6a21\u578b\u7684\u6838\u5fc3\u7406\u5ff5\u3002\u60f3\u8c61Linux\u7cfb\u7edf\u662f\u4e00\u5ea7\u5927\u578b\u56fe\u4e66\u9986&#xff0c;\u7528\u6237\u662f\u8bfb\u8005&#xff0c;\u6587\u4ef6\u662f\u4e66\u7c4d&#xff0c;\u800c\u6743\u9650\u5219\u662f\u51b3\u5b9a\u8c01\u80fd\u501f\u9605\u54ea\u4e9b\u4e66\u7684\u89c4\u5219\u3002<\/p>\n<h4>1.1 \u4e09\u7c7b\u7528\u6237\u8eab\u4efd<\/h4>\n<p>Linux\u5c06\u6587\u4ef6\u8bbf\u95ee\u8005\u5206\u4e3a\u4e09\u7c7b&#xff1a;<\/p>\n<ul>\n<li>\u6240\u6709\u8005(Owner)&#xff1a;\u6587\u4ef6\u7684\u521b\u5efa\u8005&#xff0c;\u62e5\u6709\u6700\u9ad8\u63a7\u5236\u6743<\/li>\n<li>\u7528\u6237\u7ec4(Group)&#xff1a;\u4e00\u7ec4\u5171\u4eab\u76f8\u540c\u6743\u9650\u7684\u7528\u6237<\/li>\n<li>\u5176\u4ed6\u4eba(Others)&#xff1a;\u65e2\u4e0d\u662f\u6240\u6709\u8005\u4e5f\u4e0d\u5c5e\u4e8e\u7528\u6237\u7ec4\u7684\u6240\u6709\u4eba<\/li>\n<\/ul>\n<h4>1.2 \u4e09\u79cd\u57fa\u672c\u6743\u9650<\/h4>\n<p>\u5bf9\u6bcf\u4e2a\u6587\u4ef6\u6216\u76ee\u5f55&#xff0c;Linux\u5b9a\u4e49\u4e86\u4e09\u79cd\u57fa\u672c\u6743\u9650&#xff1a;<\/p>\n<ul>\n<li>\u8bfb\u53d6\u00ae&#xff1a;\u67e5\u770b\u6587\u4ef6\u5185\u5bb9\u6216\u5217\u51fa\u76ee\u5f55\u5185\u5bb9<\/li>\n<li>\u5199\u5165(w)&#xff1a;\u4fee\u6539\u6587\u4ef6\u5185\u5bb9\u6216\u5728\u76ee\u5f55\u4e2d\u521b\u5efa\u3001\u5220\u9664\u6587\u4ef6<\/li>\n<li>\u6267\u884c(x)&#xff1a;\u8fd0\u884c\u53ef\u6267\u884c\u6587\u4ef6\u6216\u8fdb\u5165\u76ee\u5f55<\/li>\n<\/ul>\n<p>\u8fd9\u79cd\u8bbe\u8ba1\u770b\u4f3c\u7b80\u5355&#xff0c;\u5374\u80fd\u901a\u8fc7\u7ec4\u5408\u6784\u5efa\u51fa\u7cbe\u7ec6\u7684\u8bbf\u95ee\u63a7\u5236\u7b56\u7565\u3002\u5c31\u50cf\u56fe\u4e66\u9986\u4e2d&#xff0c;\u6709\u4e9b\u4e66\u53ef\u4ee5\u9605\u8bfb\u4f46\u4e0d\u80fd\u5e26\u8d70(\u53ea\u8bfb)&#xff0c;\u6709\u4e9b\u533a\u57df\u53ea\u6709\u7279\u5b9a\u4eba\u5458\u624d\u80fd\u8fdb\u5165(\u6267\u884c\u6743\u9650)\u3002 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250729231711-68895677c5ee9.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h3>2. \u7528\u6237\u4e0e\u7ec4\u7ba1\u7406&#xff1a;\u6784\u5efa\u8bbf\u95ee\u63a7\u5236\u7684\u57fa\u7840<\/h3>\n<h4>2.1 \u7528\u6237\u7ba1\u7406\u57fa\u7840\u64cd\u4f5c<\/h4>\n<p>\u5728Linux\u4e2d&#xff0c;\u6bcf\u4e2a\u7528\u6237\u90fd\u6709\u552f\u4e00\u7684\u7528\u6237ID(UID)\u548c\u4e3b\u7ec4ID(GID)\u3002\u521b\u5efa\u548c\u7ba1\u7406\u7528\u6237\u7684\u57fa\u672c\u547d\u4ee4\u5305\u62ec&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u521b\u5efa\u65b0\u7528\u6237<\/span><br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">useradd<\/span> -m -s \/bin\/bash developer<\/p>\n<p><span class=\"token comment\"># \u8bbe\u7f6e\u7528\u6237\u5bc6\u7801<\/span><br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">passwd<\/span> developer<\/p>\n<p><span class=\"token comment\"># \u67e5\u770b\u7528\u6237\u4fe1\u606f<\/span><br \/>\n<span class=\"token function\">id<\/span> developer<\/p>\n<p><span class=\"token comment\"># \u4fee\u6539\u7528\u6237\u5c5e\u6027<\/span><br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">usermod<\/span> -aG <span class=\"token function\">sudo<\/span> developer  <span class=\"token comment\"># \u5c06\u7528\u6237\u6dfb\u52a0\u5230sudo\u7ec4<\/span><\/p>\n<p><span class=\"token comment\"># \u5220\u9664\u7528\u6237<\/span><br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">userdel<\/span> -r developer  <span class=\"token comment\"># -r\u9009\u9879\u540c\u65f6\u5220\u9664\u7528\u6237\u4e3b\u76ee\u5f55<\/span><\/p>\n<h4>2.2 \u7ec4\u7ba1\u7406\u4e0e\u7b56\u7565<\/h4>\n<p>\u7528\u6237\u7ec4\u662f\u5b9e\u73b0\u6743\u9650\u96c6\u4e2d\u7ba1\u7406\u7684\u5173\u952e\u673a\u5236&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u521b\u5efa\u65b0\u7ec4<\/span><br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">groupadd<\/span> developers<\/p>\n<p><span class=\"token comment\"># \u5c06\u7528\u6237\u6dfb\u52a0\u5230\u7ec4<\/span><br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">usermod<\/span> -aG developers john<\/p>\n<p><span class=\"token comment\"># \u4ece\u7ec4\u4e2d\u79fb\u9664\u7528\u6237<\/span><br \/>\n<span class=\"token function\">sudo<\/span> gpasswd -d john developers<\/p>\n<p><span class=\"token comment\"># \u67e5\u770b\u7ec4\u4fe1\u606f<\/span><br \/>\ngetent group developers<\/p>\n<p><span class=\"token comment\"># \u5220\u9664\u7ec4<\/span><br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">groupdel<\/span> developers<\/p>\n<h4>2.3 \u5b9e\u9645\u6848\u4f8b&#xff1a;\u5f00\u53d1\u56e2\u961f\u6743\u9650\u914d\u7f6e<\/h4>\n<p>\u5047\u8bbe\u6211\u4eec\u6709\u4e00\u4e2aWeb\u5e94\u7528\u90e8\u7f72\u5728\u670d\u52a1\u5668\u4e0a&#xff0c;\u6d89\u53ca\u524d\u7aef\u3001\u540e\u7aef\u548c\u8fd0\u7ef4\u4e09\u4e2a\u56e2\u961f\u3002\u6211\u4eec\u53ef\u4ee5\u8fd9\u6837\u89c4\u5212\u6743\u9650&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u521b\u5efa\u7ec4<\/span><br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">groupadd<\/span> frontend<br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">groupadd<\/span> backend<br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">groupadd<\/span> devops<\/p>\n<p><span class=\"token comment\"># \u521b\u5efa\u9879\u76ee\u76ee\u5f55<\/span><br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">mkdir<\/span> -p \/var\/www\/myapp<br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">mkdir<\/span> -p \/var\/www\/myapp\/<span class=\"token punctuation\">{<\/span>frontend,backend,config,logs<span class=\"token punctuation\">}<\/span><\/p>\n<p><span class=\"token comment\"># \u8bbe\u7f6e\u76ee\u5f55\u6240\u6709\u6743<\/span><br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">chown<\/span> -R root:devops \/var\/www\/myapp<br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">chown<\/span> -R root:frontend \/var\/www\/myapp\/frontend<br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">chown<\/span> -R root:backend \/var\/www\/myapp\/backend<\/p>\n<p><span class=\"token comment\"># \u8bbe\u7f6e\u6743\u9650<\/span><br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">chmod<\/span> <span class=\"token number\">755<\/span> \/var\/www\/myapp<br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">chmod<\/span> <span class=\"token number\">775<\/span> \/var\/www\/myapp\/frontend<br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">chmod<\/span> <span class=\"token number\">775<\/span> \/var\/www\/myapp\/backend<br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">chmod<\/span> <span class=\"token number\">770<\/span> \/var\/www\/myapp\/config<br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">chmod<\/span> <span class=\"token number\">774<\/span> \/var\/www\/myapp\/logs<\/p>\n<p>\u8fd9\u6837&#xff0c;\u524d\u7aef\u56e2\u961f\u53ea\u80fd\u4fee\u6539\u524d\u7aef\u4ee3\u7801&#xff0c;\u540e\u7aef\u56e2\u961f\u53ea\u80fd\u4fee\u6539\u540e\u7aef\u4ee3\u7801&#xff0c;\u800c\u8fd0\u7ef4\u56e2\u961f\u5219\u53ef\u4ee5\u7ba1\u7406\u6574\u4e2a\u5e94\u7528\u3002<\/p>\n<h3>3. \u6587\u4ef6\u6743\u9650\u7ba1\u7406&#xff1a;chmod\u4e0echown\u7684\u827a\u672f<\/h3>\n<h4>3.1 \u7406\u89e3\u6743\u9650\u8868\u793a\u6cd5<\/h4>\n<p>Linux\u4f7f\u7528\u4e24\u79cd\u65b9\u5f0f\u8868\u793a\u6743\u9650&#xff1a;<\/p>\n<ul>\n<li>\u7b26\u53f7\u8868\u793a\u6cd5&#xff1a;\u4f7f\u7528r(\u8bfb)\u3001w(\u5199)\u3001x(\u6267\u884c)\u5b57\u7b26<\/li>\n<li>\u6570\u5b57\u8868\u793a\u6cd5&#xff1a;\u8bfb&#061;4&#xff0c;\u5199&#061;2&#xff0c;\u6267\u884c&#061;1&#xff0c;\u5c06\u6743\u9650\u503c\u76f8\u52a0<\/li>\n<\/ul>\n<p>\u4f8b\u5982&#xff0c;\u6743\u9650&#034;rwxr-xr\u2013&#034;\u5bf9\u5e94\u7684\u6570\u5b57\u8868\u793a\u4e3a754\u3002<\/p>\n<h4>3.2 \u4fee\u6539\u6587\u4ef6\u6743\u9650<\/h4>\n<p>chmod\u547d\u4ee4\u7528\u4e8e\u4fee\u6539\u6587\u4ef6\u6743\u9650&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u7b26\u53f7\u8868\u793a\u6cd5<\/span><br \/>\n<span class=\"token function\">chmod<\/span> u&#043;x script.sh  <span class=\"token comment\"># \u7ed9\u6240\u6709\u8005\u6dfb\u52a0\u6267\u884c\u6743\u9650<\/span><br \/>\n<span class=\"token function\">chmod<\/span> g-w,o-r file.txt  <span class=\"token comment\"># \u79fb\u9664\u7ec4\u7684\u5199\u6743\u9650\u548c\u5176\u4ed6\u4eba\u7684\u8bfb\u6743\u9650<\/span><br \/>\n<span class=\"token function\">chmod<\/span> a&#043;r document.pdf  <span class=\"token comment\"># \u7ed9\u6240\u6709\u4eba\u6dfb\u52a0\u8bfb\u6743\u9650<\/span><\/p>\n<p><span class=\"token comment\"># \u6570\u5b57\u8868\u793a\u6cd5<\/span><br \/>\n<span class=\"token function\">chmod<\/span> <span class=\"token number\">755<\/span> script.sh  <span class=\"token comment\"># \u8bbe\u7f6e\u4e3arwxr-xr-x<\/span><br \/>\n<span class=\"token function\">chmod<\/span> <span class=\"token number\">600<\/span> id_rsa  <span class=\"token comment\"># \u8bbe\u7f6e\u4e3arw&#8212;&#8212;-<\/span><\/p>\n<h4>3.3 \u4fee\u6539\u6587\u4ef6\u6240\u6709\u6743<\/h4>\n<p>chown\u547d\u4ee4\u7528\u4e8e\u4fee\u6539\u6587\u4ef6\u7684\u6240\u6709\u8005\u548c\u7ec4&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u4fee\u6539\u6240\u6709\u8005<\/span><br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">chown<\/span> john file.txt<\/p>\n<p><span class=\"token comment\"># \u4fee\u6539\u7ec4<\/span><br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">chown<\/span> :developers file.txt<\/p>\n<p><span class=\"token comment\"># \u540c\u65f6\u4fee\u6539\u6240\u6709\u8005\u548c\u7ec4<\/span><br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">chown<\/span> john:developers file.txt<\/p>\n<p><span class=\"token comment\"># \u9012\u5f52\u4fee\u6539\u76ee\u5f55\u53ca\u5176\u5185\u5bb9<\/span><br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">chown<\/span> -R john:developers \/path\/to\/directory<\/p>\n<h4>3.4 \u7279\u6b8a\u6743\u9650\u4f4d&#xff1a;\u63d0\u5347\u80fd\u529b\u4e0e\u5b89\u5168<\/h4>\n<p>\u9664\u4e86\u57fa\u672c\u6743\u9650\u5916&#xff0c;Linux\u8fd8\u63d0\u4f9b\u4e86\u4e09\u79cd\u7279\u6b8a\u6743\u9650\u4f4d&#xff1a;<\/p>\n<ul>\n<li>SUID(4000)&#xff1a;\u6267\u884c\u65f6\u4ee5\u6587\u4ef6\u6240\u6709\u8005\u6743\u9650\u8fd0\u884c<\/li>\n<li>SGID(2000)&#xff1a;\u6267\u884c\u65f6\u4ee5\u6587\u4ef6\u6240\u5c5e\u7ec4\u6743\u9650\u8fd0\u884c&#xff0c;\u5e94\u7528\u4e8e\u76ee\u5f55\u65f6\u65b0\u5efa\u6587\u4ef6\u7ee7\u627f\u76ee\u5f55\u7ec4<\/li>\n<li>Sticky Bit(1000)&#xff1a;\u53ea\u6709\u6587\u4ef6\u6240\u6709\u8005\u624d\u80fd\u5220\u9664\u6587\u4ef6&#xff0c;\u5e38\u7528\u4e8e\/tmp\u76ee\u5f55<\/li>\n<\/ul>\n<p><span class=\"token comment\"># \u8bbe\u7f6eSUID<\/span><br \/>\n<span class=\"token function\">chmod<\/span> u&#043;s \/usr\/bin\/passwd<\/p>\n<p><span class=\"token comment\"># \u8bbe\u7f6eSGID<\/span><br \/>\n<span class=\"token function\">chmod<\/span> g&#043;s \/var\/www\/html<\/p>\n<p><span class=\"token comment\"># \u8bbe\u7f6eSticky Bit<\/span><br \/>\n<span class=\"token function\">chmod<\/span> &#043;t \/tmp<\/p>\n<h3>4. \u9ad8\u7ea7\u8bbf\u95ee\u63a7\u5236&#xff1a;\u8d85\u8d8a\u4f20\u7edf\u6743\u9650\u6a21\u578b<\/h3>\n<h4>4.1 \u8bbf\u95ee\u63a7\u5236\u5217\u8868(ACL)<\/h4>\n<p>\u5f53\u57fa\u672c\u6743\u9650\u6a21\u578b\u4e0d\u8db3\u4ee5\u6ee1\u8db3\u590d\u6742\u9700\u6c42\u65f6&#xff0c;ACL\u63d0\u4f9b\u4e86\u66f4\u7cbe\u7ec6\u7684\u63a7\u5236&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u5b89\u88c5ACL\u5de5\u5177<\/span><br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">apt<\/span> <span class=\"token function\">install<\/span> acl  <span class=\"token comment\"># Debian\/Ubuntu<\/span><br \/>\n<span class=\"token function\">sudo<\/span> yum <span class=\"token function\">install<\/span> acl  <span class=\"token comment\"># CentOS\/RHEL<\/span><\/p>\n<p><span class=\"token comment\"># \u4e3a\u7279\u5b9a\u7528\u6237\u8bbe\u7f6eACL<\/span><br \/>\nsetfacl -m u:john:rx file.txt<\/p>\n<p><span class=\"token comment\"># \u4e3a\u7279\u5b9a\u7ec4\u8bbe\u7f6eACL<\/span><br \/>\nsetfacl -m g:developers:rwx directory\/<\/p>\n<p><span class=\"token comment\"># \u67e5\u770b\u6587\u4ef6ACL<\/span><br \/>\ngetfacl file.txt<\/p>\n<p><span class=\"token comment\"># \u9012\u5f52\u8bbe\u7f6e\u76ee\u5f55ACL<\/span><br \/>\nsetfacl -R -m g:developers:rx \/project\/docs<\/p>\n<h4>4.2 sudo\u4e0e\u6743\u9650\u59d4\u6d3e<\/h4>\n<p>sudo\u547d\u4ee4\u5141\u8bb8\u666e\u901a\u7528\u6237\u4ee5\u5176\u4ed6\u7528\u6237(\u901a\u5e38\u662froot)\u7684\u8eab\u4efd\u6267\u884c\u547d\u4ee4&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u7f16\u8f91sudo\u914d\u7f6e<\/span><br \/>\n<span class=\"token function\">sudo<\/span> visudo<\/p>\n<p><span class=\"token comment\"># \u5141\u8bb8developers\u7ec4\u7684\u6210\u5458\u91cd\u542fweb\u670d\u52a1\u800c\u65e0\u9700\u5bc6\u7801<\/span><br \/>\n%developers <span class=\"token assign-left variable\">ALL<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token punctuation\">(<\/span>ALL<span class=\"token punctuation\">)<\/span> NOPASSWD: \/bin\/systemctl restart nginx<\/p>\n<h4>4.3 \u5b9e\u73b0\u6700\u5c0f\u6743\u9650\u539f\u5219<\/h4>\n<p>\u5b89\u5168\u6700\u4f73\u5b9e\u8df5\u5efa\u8bae\u9075\u5faa&#034;\u6700\u5c0f\u6743\u9650\u539f\u5219&#034;\u2014\u53ea\u6388\u4e88\u5b8c\u6210\u4efb\u52a1\u6240\u9700\u7684\u6700\u5c0f\u6743\u9650&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u521b\u5efa\u5e94\u7528\u4e13\u7528\u7528\u6237<\/span><br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">useradd<\/span> -r -s \/usr\/sbin\/nologin appuser<\/p>\n<p><span class=\"token comment\"># \u9650\u5236\u5e94\u7528\u76ee\u5f55\u6743\u9650<\/span><br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">chown<\/span> -R appuser:appuser \/opt\/myapp<br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">chmod<\/span> -R <span class=\"token number\">750<\/span> \/opt\/myapp<\/p>\n<p><span class=\"token comment\"># \u4f7f\u7528systemd\u670d\u52a1\u6587\u4ef6\u9650\u5236\u6743\u9650<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>Service<span class=\"token punctuation\">]<\/span><br \/>\n<span class=\"token assign-left variable\">User<\/span><span class=\"token operator\">&#061;<\/span>appuser<br \/>\n<span class=\"token assign-left variable\">Group<\/span><span class=\"token operator\">&#061;<\/span>appuser<br \/>\n<span class=\"token assign-left variable\">PrivateTmp<\/span><span class=\"token operator\">&#061;<\/span>true<br \/>\n<span class=\"token assign-left variable\">ProtectSystem<\/span><span class=\"token operator\">&#061;<\/span>full<br \/>\n<span class=\"token assign-left variable\">ReadOnlyDirectories<\/span><span class=\"token operator\">&#061;<\/span>\/<br \/>\n<span class=\"token assign-left variable\">ReadWriteDirectories<\/span><span class=\"token operator\">&#061;<\/span>\/opt\/myapp\/data<\/p>\n<h3>5. \u6743\u9650\u5ba1\u8ba1\u4e0e\u6545\u969c\u6392\u67e5<\/h3>\n<h4>5.1 \u6743\u9650\u95ee\u9898\u8bca\u65ad<\/h4>\n<p>\u5f53\u9047\u5230&#034;Permission denied&#034;\u9519\u8bef\u65f6&#xff0c;\u53ef\u4ee5\u6309\u4ee5\u4e0b\u6b65\u9aa4\u6392\u67e5&#xff1a;<\/p>\n<li>\u68c0\u67e5\u6587\u4ef6\u6743\u9650&#xff1a;ls -l file<\/li>\n<li>\u9a8c\u8bc1\u7528\u6237\u548c\u7ec4&#xff1a;id username<\/li>\n<li>\u68c0\u67e5\u76ee\u5f55\u6743\u9650\u94fe&#xff1a;namei -l \/path\/to\/file<\/li>\n<li>\u67e5\u770bSELinux\u72b6\u6001&#xff1a;getenforce<\/li>\n<li>\u68c0\u67e5\u6269\u5c55\u5c5e\u6027&#xff1a;lsattr file<\/li>\n<h4>5.2 \u6743\u9650\u5ba1\u8ba1\u5de5\u5177<\/h4>\n<p>\u5b9a\u671f\u5ba1\u8ba1\u6743\u9650\u914d\u7f6e\u662f\u5b89\u5168\u7ef4\u62a4\u7684\u91cd\u8981\u73af\u8282&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u67e5\u627e\u5177\u6709\u5371\u9669\u6743\u9650\u7684\u6587\u4ef6<\/span><br \/>\n<span class=\"token function\">find<\/span> \/ -type f -perm -4000 -o -perm -2000 -ls <span class=\"token operator\"><span class=\"token file-descriptor important\">2<\/span>&gt;<\/span>\/dev\/null<\/p>\n<p><span class=\"token comment\"># \u67e5\u627e\u4e16\u754c\u53ef\u5199\u7684\u6587\u4ef6<\/span><br \/>\n<span class=\"token function\">find<\/span> \/ -type f -perm -o&#043;w -ls <span class=\"token operator\"><span class=\"token file-descriptor important\">2<\/span>&gt;<\/span>\/dev\/null<\/p>\n<p><span class=\"token comment\"># \u4f7f\u7528\u4e13\u4e1a\u5de5\u5177\u8fdb\u884c\u5ba1\u8ba1<\/span><br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">apt<\/span> <span class=\"token function\">install<\/span> lynis<br \/>\n<span class=\"token function\">sudo<\/span> lynis audit system<\/p>\n<h3>6. \u5b9e\u9645\u5e94\u7528\u573a\u666f\u4e0e\u6700\u4f73\u5b9e\u8df5<\/h3>\n<h4>6.1 Web\u670d\u52a1\u5668\u6743\u9650\u914d\u7f6e<\/h4>\n<p>\u5bf9\u4e8e\u8fd0\u884cNginx\u6216Apache\u7684Web\u670d\u52a1\u5668&#xff0c;\u5408\u7406\u7684\u6743\u9650\u8bbe\u7f6e\u81f3\u5173\u91cd\u8981&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u521b\u5efa\u4e13\u7528Web\u670d\u52a1\u7528\u6237<\/span><br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">useradd<\/span> -r -s \/usr\/sbin\/nologin www-data<\/p>\n<p><span class=\"token comment\"># \u8bbe\u7f6e\u7f51\u7ad9\u76ee\u5f55\u6743\u9650<\/span><br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">chown<\/span> -R root:www-data \/var\/www\/html<br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">chmod<\/span> -R <span class=\"token number\">750<\/span> \/var\/www\/html<\/p>\n<p><span class=\"token comment\"># \u4e3a\u4e0a\u4f20\u76ee\u5f55\u8bbe\u7f6e\u7279\u6b8a\u6743\u9650<\/span><br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">mkdir<\/span> -p \/var\/www\/html\/uploads<br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">chown<\/span> www-data:www-data \/var\/www\/html\/uploads<br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">chmod<\/span> <span class=\"token number\">770<\/span> \/var\/www\/html\/uploads<\/p>\n<h4>6.2 \u6570\u636e\u5e93\u670d\u52a1\u6743\u9650\u9694\u79bb<\/h4>\n<p>\u6570\u636e\u5e93\u670d\u52a1\u9700\u8981\u7279\u522b\u6ce8\u610f\u6743\u9650\u9694\u79bb&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u521b\u5efa\u4e13\u7528\u6570\u636e\u5e93\u7528\u6237<\/span><br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">useradd<\/span> -r -s \/usr\/sbin\/nologin mysql<\/p>\n<p><span class=\"token comment\"># \u8bbe\u7f6e\u6570\u636e\u76ee\u5f55\u6743\u9650<\/span><br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">mkdir<\/span> -p \/var\/lib\/mysql<br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">chown<\/span> -R mysql:mysql \/var\/lib\/mysql<br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">chmod<\/span> -R <span class=\"token number\">700<\/span> \/var\/lib\/mysql<\/p>\n<p><span class=\"token comment\"># \u9650\u5236\u914d\u7f6e\u6587\u4ef6\u8bbf\u95ee<\/span><br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">chown<\/span> root:mysql \/etc\/mysql\/my.cnf<br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">chmod<\/span> <span class=\"token number\">640<\/span> \/etc\/mysql\/my.cnf<\/p>\n<h4>6.3 Python\u5e94\u7528\u90e8\u7f72\u6743\u9650\u7b56\u7565<\/h4>\n<p>\u90e8\u7f72Python\u5e94\u7528\u65f6&#xff0c;\u5e94\u9075\u5faa\u4ee5\u4e0b\u6743\u9650\u7b56\u7565&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u521b\u5efa\u5e94\u7528\u4e13\u7528\u7528\u6237<\/span><br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">useradd<\/span> -m -s \/bin\/bash appuser<\/p>\n<p><span class=\"token comment\"># \u8bbe\u7f6e\u5e94\u7528\u76ee\u5f55\u6743\u9650<\/span><br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">mkdir<\/span> -p \/opt\/myapp<br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">chown<\/span> -R appuser:appuser \/opt\/myapp<br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">chmod<\/span> -R <span class=\"token number\">750<\/span> \/opt\/myapp<\/p>\n<p><span class=\"token comment\"># \u8bbe\u7f6e\u865a\u62df\u73af\u5883\u6743\u9650<\/span><br \/>\n<span class=\"token function\">sudo<\/span> -u appuser python -m venv \/opt\/myapp\/venv<br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">chmod<\/span> -R <span class=\"token number\">750<\/span> \/opt\/myapp\/venv<\/p>\n<p><span class=\"token comment\"># \u914d\u7f6e\u6587\u4ef6\u6743\u9650<\/span><br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">chown<\/span> root:appuser \/opt\/myapp\/config.ini<br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">chmod<\/span> <span class=\"token number\">640<\/span> \/opt\/myapp\/config.ini<\/p>\n<h3>7. \u81ea\u52a8\u5316\u6743\u9650\u7ba1\u7406<\/h3>\n<h4>7.1 \u4f7f\u7528Ansible\u81ea\u52a8\u5316\u6743\u9650\u914d\u7f6e<\/h4>\n<p>\u5bf9\u4e8e\u591a\u670d\u52a1\u5668\u73af\u5883&#xff0c;\u53ef\u4ee5\u4f7f\u7528Ansible\u5b9e\u73b0\u6743\u9650\u914d\u7f6e\u81ea\u52a8\u5316&#xff1a;<\/p>\n<p><span class=\"token punctuation\">&#8212;<\/span><br \/>\n<span class=\"token punctuation\">&#8211;<\/span> <span class=\"token key atrule\">name<\/span><span class=\"token punctuation\">:<\/span> Configure user permissions<br \/>\n  <span class=\"token key atrule\">hosts<\/span><span class=\"token punctuation\">:<\/span> webservers<br \/>\n  <span class=\"token key atrule\">become<\/span><span class=\"token punctuation\">:<\/span> yes<br \/>\n  <span class=\"token key atrule\">tasks<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token punctuation\">&#8211;<\/span> <span class=\"token key atrule\">name<\/span><span class=\"token punctuation\">:<\/span> Create application user<br \/>\n      <span class=\"token key atrule\">user<\/span><span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token key atrule\">name<\/span><span class=\"token punctuation\">:<\/span> appuser<br \/>\n        <span class=\"token key atrule\">shell<\/span><span class=\"token punctuation\">:<\/span> \/bin\/bash<br \/>\n        <span class=\"token key atrule\">createhome<\/span><span class=\"token punctuation\">:<\/span> yes<\/p>\n<p>    <span class=\"token punctuation\">&#8211;<\/span> <span class=\"token key atrule\">name<\/span><span class=\"token punctuation\">:<\/span> Create application directories<br \/>\n      <span class=\"token key atrule\">file<\/span><span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token key atrule\">path<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;{{ item.path }}&#034;<\/span><br \/>\n        <span class=\"token key atrule\">state<\/span><span class=\"token punctuation\">:<\/span> directory<br \/>\n        <span class=\"token key atrule\">owner<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;{{ item.owner }}&#034;<\/span><br \/>\n        <span class=\"token key atrule\">group<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;{{ item.group }}&#034;<\/span><br \/>\n        <span class=\"token key atrule\">mode<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;{{ item.mode }}&#034;<\/span><br \/>\n      <span class=\"token key atrule\">loop<\/span><span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token punctuation\">&#8211;<\/span> <span class=\"token punctuation\">{<\/span> <span class=\"token key atrule\">path<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;\/opt\/myapp&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token key atrule\">owner<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;appuser&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token key atrule\">group<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;appuser&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token key atrule\">mode<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;0750&#034;<\/span> <span class=\"token punctuation\">}<\/span><br \/>\n        <span class=\"token punctuation\">&#8211;<\/span> <span class=\"token punctuation\">{<\/span> <span class=\"token key atrule\">path<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;\/opt\/myapp\/data&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token key atrule\">owner<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;appuser&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token key atrule\">group<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;appuser&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token key atrule\">mode<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;0750&#034;<\/span> <span class=\"token punctuation\">}<\/span><br \/>\n        <span class=\"token punctuation\">&#8211;<\/span> <span class=\"token punctuation\">{<\/span> <span class=\"token key atrule\">path<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;\/opt\/myapp\/logs&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token key atrule\">owner<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;appuser&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token key atrule\">group<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;syslog&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token key atrule\">mode<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;0770&#034;<\/span> <span class=\"token punctuation\">}<\/span><\/p>\n<h4>7.2 \u6743\u9650\u6a21\u677f\u4e0e\u6807\u51c6\u5316<\/h4>\n<p>\u5efa\u7acb\u6743\u9650\u6a21\u677f\u53ef\u4ee5\u786e\u4fdd\u4e00\u81f4\u6027&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u521b\u5efa\u6743\u9650\u6a21\u677f\u811a\u672c<\/span><br \/>\n<span class=\"token function\">cat<\/span> <span class=\"token operator\">&gt;<\/span> \/usr\/local\/bin\/setup-app-perms.sh <span class=\"token operator\">&lt;&lt;<\/span> <span class=\"token string\">&#039;EOF&#039;<br \/>\n#!\/bin\/bash<br \/>\nAPP_NAME&#061;$1<br \/>\nAPP_USER&#061;$2<\/p>\n<p># \u521b\u5efa\u5fc5\u8981\u76ee\u5f55<br \/>\nmkdir -p \/opt\/$APP_NAME\/{bin,etc,data,logs,tmp}<\/p>\n<p># \u8bbe\u7f6e\u57fa\u672c\u6743\u9650<br \/>\nchown -R $APP_USER:$APP_USER \/opt\/$APP_NAME<br \/>\nchmod -R 750 \/opt\/$APP_NAME<br \/>\nchmod 770 \/opt\/$APP_NAME\/logs<br \/>\nchmod 770 \/opt\/$APP_NAME\/tmp<\/p>\n<p># \u8bbe\u7f6e\u7279\u6b8a\u6743\u9650<br \/>\nfind \/opt\/$APP_NAME\/bin -type f -exec chmod 750 {} \\\\;<br \/>\nfind \/opt\/$APP_NAME\/etc -type f -exec chmod 640 {} \\\\;<br \/>\nEOF<\/span><\/p>\n<p><span class=\"token function\">chmod<\/span> &#043;x \/usr\/local\/bin\/setup-app-perms.sh<\/p>\n<h3>8. \u603b\u7ed3\u4e0e\u6700\u4f73\u5b9e\u8df5<\/h3>\n<p>Linux\u6743\u9650\u7ba1\u7406\u662f\u4e00\u9879\u65e2\u7b80\u5355\u53c8\u590d\u6742\u7684\u6280\u672f\u3002\u7b80\u5355\u5728\u4e8e\u5176\u57fa\u672c\u6982\u5ff5\u6e05\u6670&#xff0c;\u590d\u6742\u5728\u4e8e\u5b9e\u9645\u5e94\u7528\u4e2d\u7684\u5404\u79cd\u7ec6\u8282\u4e0e\u7ec4\u5408\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u6838\u5fc3\u6700\u4f73\u5b9e\u8df5&#xff1a;<\/p>\n<li>\u9075\u5faa\u6700\u5c0f\u6743\u9650\u539f\u5219&#xff1a;\u53ea\u6388\u4e88\u5b8c\u6210\u4efb\u52a1\u6240\u9700\u7684\u6700\u5c0f\u6743\u9650<\/li>\n<li>\u4f7f\u7528\u4e13\u7528\u670d\u52a1\u8d26\u6237&#xff1a;\u4e3a\u6bcf\u4e2a\u670d\u52a1\u521b\u5efa\u4e13\u7528\u7cfb\u7edf\u7528\u6237<\/li>\n<li>\u5206\u7ec4\u7ba1\u7406\u6743\u9650&#xff1a;\u901a\u8fc7\u7528\u6237\u7ec4\u800c\u975e\u4e2a\u4eba\u7528\u6237\u7ba1\u7406\u6743\u9650<\/li>\n<li>\u4fdd\u62a4\u7cfb\u7edf\u6587\u4ef6&#xff1a;\u7cfb\u7edf\u914d\u7f6e\u6587\u4ef6\u5e94\u4e25\u683c\u9650\u5236\u5199\u5165\u6743\u9650<\/li>\n<li>\u5b9a\u671f\u5ba1\u8ba1\u6743\u9650&#xff1a;\u5b9a\u671f\u68c0\u67e5\u5e76\u4fee\u590d\u4e0d\u5f53\u6743\u9650\u8bbe\u7f6e<\/li>\n<li>\u6587\u6863\u5316\u6743\u9650\u7b56\u7565&#xff1a;\u5efa\u7acb\u5e76\u7ef4\u62a4\u6743\u9650\u7ba1\u7406\u6587\u6863<\/li>\n<li>\u81ea\u52a8\u5316\u6743\u9650\u914d\u7f6e&#xff1a;\u4f7f\u7528\u914d\u7f6e\u7ba1\u7406\u5de5\u5177\u786e\u4fdd\u4e00\u81f4\u6027<\/li>\n<li>\u6ce8\u610f\u6743\u9650\u7ee7\u627f&#xff1a;\u4e86\u89e3\u76ee\u5f55\u6743\u9650\u5982\u4f55\u5f71\u54cd\u5185\u90e8\u6587\u4ef6<\/li>\n<p>\u638c\u63e1Linux\u7528\u6237\u4e0e\u7ec4\u6743\u9650\u914d\u7f6e\u4e0d\u4ec5\u80fd\u89e3\u51b3\u65e5\u5e38\u8fd0\u7ef4\u95ee\u9898&#xff0c;\u66f4\u662f\u6784\u5efa\u5b89\u5168\u53ef\u9760\u7cfb\u7edf\u7684\u57fa\u7840\u3002\u901a\u8fc7\u672c\u6587\u4ecb\u7ecd\u7684\u6982\u5ff5\u548c\u6280\u672f&#xff0c;\u4f60\u5df2\u7ecf\u5177\u5907\u4e86\u8bbe\u8ba1\u548c\u5b9e\u65bd\u5b8c\u5584\u6743\u9650\u7b56\u7565\u7684\u80fd\u529b&#xff0c;\u4e3a\u4f60\u7684\u670d\u52a1\u5668\u7b51\u8d77\u5b89\u5168\u7684\u7b2c\u4e00\u9053\u9632\u7ebf\u3002<\/p>\n<h3>\u53c2\u8003\u8d44\u6599\u4e0e\u8fdb\u4e00\u6b65\u5b66\u4e60<\/h3>\n<ul>\n<li>Linux\u6743\u9650\u7ba1\u7406\u5b98\u65b9\u6587\u6863<\/li>\n<li>Linux Foundation\u7cfb\u7edf\u7ba1\u7406\u5458\u6307\u5357<\/li>\n<li>Red Hat\u7cfb\u7edf\u7ba1\u7406\u5458\u6307\u5357<\/li>\n<li>Linux\u6743\u9650\u7ba1\u7406\u6df1\u5ea6\u89e3\u6790<\/li>\n<li>ACL\u9ad8\u7ea7\u5e94\u7528<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.3k\u6b21\uff0c\u70b9\u8d5e40\u6b21\uff0c\u6536\u85cf28\u6b21\u3002\u672c\u6587\u8be6\u7ec6\u4ecb\u7ecdLinux\u7cfb\u7edf\u4e2d\u7528\u6237\u4e0e\u7ec4\u6743\u9650\u914d\u7f6e\u7684\u6838\u5fc3\u6982\u5ff5\u4e0e\u5b9e\u8df5\u6280\u5de7\u3002\u4ece\u6743\u9650\u6a21\u578b\u57fa\u7840\u5230\u9ad8\u7ea7\u8bbf\u95ee\u63a7\u5236\u5217\u8868(ACL)\uff0c\u4ece\u7528\u6237\u7ba1\u7406\u5230\u6743\u9650\u59d4\u6d3e\uff0c\u5168\u9762\u89e3\u6790\u5982\u4f55\u6784\u5efa\u5b89\u5168\u53ef\u9760\u7684\u591a\u7528\u6237\u73af\u5883\u3002\u901a\u8fc7\u5b9e\u9645\u6848\u4f8b\u548c\u6700\u4f73\u5b9e\u8df5\uff0c\u5e2e\u52a9\u5f00\u53d1\u8005\u548c\u7cfb\u7edf\u7ba1\u7406\u5458\u638c\u63e1\u6743\u9650\u7ba1\u7406\u6280\u80fd\uff0c\u6709\u6548\u9632\u8303\u5b89\u5168\u98ce\u9669\uff0c\u63d0\u5347\u7cfb\u7edf\u7a33\u5b9a\u6027\u3002<\/p>\n","protected":false},"author":2,"featured_media":47298,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[58,61,4392,43,782],"topic":[],"class_list":["post-47299","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-linux","tag-61","tag-4392","tag-43","tag-782"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u3010\u670d\u52a1\u5668\u4e0e\u90e8\u7f72 33\u3011Linux\u7528\u6237\u6743\u9650\u7ba1\u7406\u5b9e\u6218\uff1a\u4ece\u96f6\u638c\u63e1\u7528\u6237\u4e0e\u7ec4\u914d\u7f6e\u8ba9\u670d\u52a1\u5668\u5b89\u5168\u65e0\u5fe7 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/47299.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u3010\u670d\u52a1\u5668\u4e0e\u90e8\u7f72 33\u3011Linux\u7528\u6237\u6743\u9650\u7ba1\u7406\u5b9e\u6218\uff1a\u4ece\u96f6\u638c\u63e1\u7528\u6237\u4e0e\u7ec4\u914d\u7f6e\u8ba9\u670d\u52a1\u5668\u5b89\u5168\u65e0\u5fe7 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.3k\u6b21\uff0c\u70b9\u8d5e40\u6b21\uff0c\u6536\u85cf28\u6b21\u3002\u672c\u6587\u8be6\u7ec6\u4ecb\u7ecdLinux\u7cfb\u7edf\u4e2d\u7528\u6237\u4e0e\u7ec4\u6743\u9650\u914d\u7f6e\u7684\u6838\u5fc3\u6982\u5ff5\u4e0e\u5b9e\u8df5\u6280\u5de7\u3002\u4ece\u6743\u9650\u6a21\u578b\u57fa\u7840\u5230\u9ad8\u7ea7\u8bbf\u95ee\u63a7\u5236\u5217\u8868(ACL)\uff0c\u4ece\u7528\u6237\u7ba1\u7406\u5230\u6743\u9650\u59d4\u6d3e\uff0c\u5168\u9762\u89e3\u6790\u5982\u4f55\u6784\u5efa\u5b89\u5168\u53ef\u9760\u7684\u591a\u7528\u6237\u73af\u5883\u3002\u901a\u8fc7\u5b9e\u9645\u6848\u4f8b\u548c\u6700\u4f73\u5b9e\u8df5\uff0c\u5e2e\u52a9\u5f00\u53d1\u8005\u548c\u7cfb\u7edf\u7ba1\u7406\u5458\u638c\u63e1\u6743\u9650\u7ba1\u7406\u6280\u80fd\uff0c\u6709\u6548\u9632\u8303\u5b89\u5168\u98ce\u9669\uff0c\u63d0\u5347\u7cfb\u7edf\u7a33\u5b9a\u6027\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/47299.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-07-29T23:17:13+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250729231711-68895677c5ee9.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/47299.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/47299.html\",\"name\":\"\u3010\u670d\u52a1\u5668\u4e0e\u90e8\u7f72 33\u3011Linux\u7528\u6237\u6743\u9650\u7ba1\u7406\u5b9e\u6218\uff1a\u4ece\u96f6\u638c\u63e1\u7528\u6237\u4e0e\u7ec4\u914d\u7f6e\u8ba9\u670d\u52a1\u5668\u5b89\u5168\u65e0\u5fe7 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-07-29T23:17:13+00:00\",\"dateModified\":\"2025-07-29T23:17:13+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/47299.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/47299.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/47299.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u3010\u670d\u52a1\u5668\u4e0e\u90e8\u7f72 33\u3011Linux\u7528\u6237\u6743\u9650\u7ba1\u7406\u5b9e\u6218\uff1a\u4ece\u96f6\u638c\u63e1\u7528\u6237\u4e0e\u7ec4\u914d\u7f6e\u8ba9\u670d\u52a1\u5668\u5b89\u5168\u65e0\u5fe7\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u3010\u670d\u52a1\u5668\u4e0e\u90e8\u7f72 33\u3011Linux\u7528\u6237\u6743\u9650\u7ba1\u7406\u5b9e\u6218\uff1a\u4ece\u96f6\u638c\u63e1\u7528\u6237\u4e0e\u7ec4\u914d\u7f6e\u8ba9\u670d\u52a1\u5668\u5b89\u5168\u65e0\u5fe7 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/47299.html","og_locale":"zh_CN","og_type":"article","og_title":"\u3010\u670d\u52a1\u5668\u4e0e\u90e8\u7f72 33\u3011Linux\u7528\u6237\u6743\u9650\u7ba1\u7406\u5b9e\u6218\uff1a\u4ece\u96f6\u638c\u63e1\u7528\u6237\u4e0e\u7ec4\u914d\u7f6e\u8ba9\u670d\u52a1\u5668\u5b89\u5168\u65e0\u5fe7 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.3k\u6b21\uff0c\u70b9\u8d5e40\u6b21\uff0c\u6536\u85cf28\u6b21\u3002\u672c\u6587\u8be6\u7ec6\u4ecb\u7ecdLinux\u7cfb\u7edf\u4e2d\u7528\u6237\u4e0e\u7ec4\u6743\u9650\u914d\u7f6e\u7684\u6838\u5fc3\u6982\u5ff5\u4e0e\u5b9e\u8df5\u6280\u5de7\u3002\u4ece\u6743\u9650\u6a21\u578b\u57fa\u7840\u5230\u9ad8\u7ea7\u8bbf\u95ee\u63a7\u5236\u5217\u8868(ACL)\uff0c\u4ece\u7528\u6237\u7ba1\u7406\u5230\u6743\u9650\u59d4\u6d3e\uff0c\u5168\u9762\u89e3\u6790\u5982\u4f55\u6784\u5efa\u5b89\u5168\u53ef\u9760\u7684\u591a\u7528\u6237\u73af\u5883\u3002\u901a\u8fc7\u5b9e\u9645\u6848\u4f8b\u548c\u6700\u4f73\u5b9e\u8df5\uff0c\u5e2e\u52a9\u5f00\u53d1\u8005\u548c\u7cfb\u7edf\u7ba1\u7406\u5458\u638c\u63e1\u6743\u9650\u7ba1\u7406\u6280\u80fd\uff0c\u6709\u6548\u9632\u8303\u5b89\u5168\u98ce\u9669\uff0c\u63d0\u5347\u7cfb\u7edf\u7a33\u5b9a\u6027\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/47299.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-07-29T23:17:13+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250729231711-68895677c5ee9.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"5 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/47299.html","url":"https:\/\/www.wsisp.com\/helps\/47299.html","name":"\u3010\u670d\u52a1\u5668\u4e0e\u90e8\u7f72 33\u3011Linux\u7528\u6237\u6743\u9650\u7ba1\u7406\u5b9e\u6218\uff1a\u4ece\u96f6\u638c\u63e1\u7528\u6237\u4e0e\u7ec4\u914d\u7f6e\u8ba9\u670d\u52a1\u5668\u5b89\u5168\u65e0\u5fe7 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-07-29T23:17:13+00:00","dateModified":"2025-07-29T23:17:13+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/47299.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/47299.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/47299.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u3010\u670d\u52a1\u5668\u4e0e\u90e8\u7f72 33\u3011Linux\u7528\u6237\u6743\u9650\u7ba1\u7406\u5b9e\u6218\uff1a\u4ece\u96f6\u638c\u63e1\u7528\u6237\u4e0e\u7ec4\u914d\u7f6e\u8ba9\u670d\u52a1\u5668\u5b89\u5168\u65e0\u5fe7"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/47299","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=47299"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/47299\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/47298"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=47299"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=47299"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=47299"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=47299"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}