{"id":123965,"date":"2026-11-08T15:01:17","date_gmt":"2026-11-08T07:01:17","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/123965.html"},"modified":"2026-11-08T15:01:17","modified_gmt":"2026-11-08T07:01:17","slug":"%e3%80%90linux-%e4%bf%ae%e7%82%bc%e5%bd%95%e3%80%91%e5%91%8a%e5%88%ab-permission-denied%ef%bc%9a%e4%b8%80%e6%96%87%e8%ae%b2%e9%80%8f-linux-%e6%9d%83%e9%99%90%e4%bd%93%e7%b3%bb%e4%b8%8e%e5%ba%95","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/123965.html","title":{"rendered":"\u3010Linux \u4fee\u70bc\u5f55\u3011\u544a\u522b Permission denied\uff1a\u4e00\u6587\u8bb2\u900f Linux \u6743\u9650\u4f53\u7cfb\u4e0e\u5e95\u5c42\u903b\u8f91"},"content":{"rendered":"<p>        \/* MD \/ \u5bcc\u6587\u672c\u4e2d\u7684 .toc\uff08\u542b\u535a\u5ba2\u56ed\u642c\u5bb6\u7b49\u5d4c\u5957\u7ed3\u6784\uff09\uff1b.toc-box \u5728\u4fa7\u680f\uff0c\u4e0d\u53d7\u5f71\u54cd *\/<br \/>\n        #content_views .toc,<br \/>\n        \/* \u7f16\u8f91\u5668\u5e38\u5728\u76ee\u5f55\u524d\u540e\u63d2\u5165\u7a7a p\uff08:empty \u4ecd\u5360 20px\uff09\uff0c\u4e00\u5e76\u53bb\u6389\u907f\u514d\u9876\u7a7a\u9699 *\/<br \/>\n        #content_views.markdown_views &gt; p:empty:has(+ .toc),<br \/>\n        #content_views.markdown_views &gt; .toc + p:empty,<br \/>\n        \/* \u5bcc\u6587\u672c\u65e7\u7248\u76ee\u5f55\u6807\u8bb0 *\/<br \/>\n        #content_views.htmledit_views #main-toc,<br \/>\n        #content_views.htmledit_views #hr-toc,<br \/>\n        #content_views.htmledit_views p[id*=\\&#8221;-toc\\&#8221;] {<br \/>\n          display: none !important;<br \/>\n        }<br \/>\n        \/* \u76ee\u5f55\u53bb\u6389\u540e\uff0c\u7d27\u8ddf\u7684\u9996\u4e2a\u6807\u9898\u4e0d\u518d\u591a\u51fa\u4e00\u5757\u4e0a\u8fb9\u8ddd *\/<br \/>\n        #content_views.markdown_views &gt; .toc + h1,<br \/>\n        #content_views.markdown_views &gt; .toc + h2,<br \/>\n        #content_views.markdown_views &gt; .toc + h3,<br \/>\n        #content_views.markdown_views &gt; .toc + h4,<br \/>\n        #content_views.markdown_views &gt; .toc + p:empty + h1,<br \/>\n        #content_views.markdown_views &gt; .toc + p:empty + h2,<br \/>\n        #content_views.markdown_views &gt; .toc + p:empty + h3,<br \/>\n        #content_views.markdown_views &gt; .toc + p:empty + h4 {<br \/>\n          margin-top: 0 !important;<br \/>\n        }<\/p>\n<h2>Linux \u4fee\u70bc\u5f55&#xff1a;\u6743\u9650<\/h2>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261108070112-6af01e38e5d02.jpg\" alt=\"\" \/><\/p>\n<p>\u5728\u524d\u51e0\u7bc7\u6587\u7ae0\u4e2d&#xff0c;\u6211\u4eec\u5148\u540e\u5b66\u4e60\u4e86 Linux \u7684\u57fa\u672c\u6587\u4ef6\u64cd\u4f5c&#xff08;pwd\u3001ls\u3001cd\u3001mkdir\u3001touch\u3001rm\u3001cp\u3001mv \u7b49&#xff09;&#xff0c;\u4ee5\u53ca\u6587\u4ef6\u5185\u5bb9\u7684\u67e5\u770b\u4e0e\u5b9a\u4f4d\u5de5\u5177\u3002<\/p>\n<p>\u5728\u8fd9\u4e9b\u57fa\u7840\u6307\u4ee4\u4e4b\u4e0a&#xff0c;\u4e00\u65e6\u8fdb\u5165\u771f\u5b9e\u7684\u591a\u7528\u6237\u73af\u5883\u6216\u670d\u52a1\u5668\u8fd0\u7ef4\u573a\u666f&#xff0c;\u4e00\u4e2a\u7ed5\u4e0d\u5f00\u7684\u6838\u5fc3\u95ee\u9898\u4fbf\u968f\u4e4b\u800c\u6765&#xff1a;\u4e0d\u540c\u7684\u7528\u6237\u5728\u7cfb\u7edf\u4e2d\u5404\u81ea\u80fd\u78b0\u54ea\u4e9b\u6587\u4ef6\u3001\u4e0d\u80fd\u78b0\u54ea\u4e9b\u6587\u4ef6&#xff1f;\u7cfb\u7edf\u53c8\u662f\u5982\u4f55\u5224\u5b9a\u5e76\u9650\u5236\u8fd9\u4e9b\u884c\u4e3a\u7684&#xff1f;<\/p>\n<p>Linux \u4f5c\u4e3a\u5178\u578b\u7684\u591a\u7528\u6237\u3001\u591a\u4efb\u52a1\u64cd\u4f5c\u7cfb\u7edf&#xff0c;\u4f9d\u8d56\u4e00\u5957\u4e25\u683c\u7684\u6743\u9650\u7ba1\u7406\u673a\u5236\u6765\u5212\u5206\u7528\u6237\u7684\u64cd\u4f5c\u8fb9\u754c<br \/>\n\u672c\u7bc7\u56f4\u7ed5\u7528\u6237\u5206\u7c7b\u3001\u6587\u4ef6\u7c7b\u578b\u3001\u6743\u9650\u5c5e\u6027\u3001\u5f52\u5c5e\u4fee\u6539\u3001\u9ed8\u8ba4\u63a9\u7801&#xff08;umask&#xff09;\u4ee5\u53ca\u9632\u8bef\u5220\u7684\u7c98\u6ede\u4f4d&#xff08;Sticky Bit&#xff09;&#xff0c;\u7ed3\u5408\u7ec8\u7aef\u5b9e\u64cd&#xff0c;\u68b3\u7406 Linux \u6743\u9650\u7684\u5e95\u5c42\u903b\u8f91\u4e0e\u65e5\u5e38\u7528\u6cd5\u3002<\/p>\n<hr \/>\n<h2>\u4e00\u3001\u7528\u6237\u5206\u7c7b\u4e0e\u8eab\u4efd\u7ba1\u7406<\/h2>\n<p>\u5728\u8ba8\u8bba\u5177\u4f53\u6587\u4ef6\u7684\u6743\u9650\u4e4b\u524d&#xff0c;\u9996\u5148\u8981\u5f04\u6e05\u64cd\u4f5c\u6587\u4ef6\u7684\u4e3b\u4f53\u2014\u2014\u7528\u6237\u3002<\/p>\n<p>Linux \u5c06\u7cfb\u7edf\u4e2d\u7684\u7528\u6237\u5927\u4f53\u5212\u5206\u4e3a\u4e24\u7c7b&#xff1a;<\/p>\n<li>\u8d85\u7ea7\u7ba1\u7406\u5458&#xff08;root&#xff09;&#xff1a;\u62e5\u6709\u7cfb\u7edf\u7684\u6700\u9ad8\u63a7\u5236\u6743&#xff0c;\u4e0d\u53d7\u666e\u901a\u6743\u9650\u673a\u5236\u7684\u7ea6\u675f&#xff0c;\u53ef\u4ee5\u521b\u5efa\u3001\u4fee\u6539\u3001\u5220\u9664\u7cfb\u7edf\u4e2d\u7684\u7edd\u5927\u591a\u6570\u8d44\u6e90\u3002<\/li>\n<li>\u666e\u901a\u7528\u6237&#xff1a;\u53d7\u6743\u9650\u673a\u5236\u7684\u4e25\u683c\u7ea6\u675f&#xff0c;\u901a\u5e38\u53ea\u80fd\u5728\u81ea\u5df1\u7684\u5bb6\u76ee\u5f55&#xff08;\/home\/username&#xff09;\u4ee5\u53ca\u88ab\u6388\u6743\u7684\u76ee\u5f55\u548c\u6587\u4ef6\u5185\u8fdb\u884c\u64cd\u4f5c\u3002<\/li>\n<p>\u666e\u901a\u7528\u6237\u4e4b\u95f4\u7684\u9694\u79bb&#xff0c;\u6b63\u662f\u901a\u8fc7\u6743\u9650\u6765\u89c4\u8303\u7684\u3002<\/p>\n<h4>1. \u65b0\u5efa\u7528\u6237\u4e0e\u521d\u59cb\u5316&#xff08;Ubuntu&#xff09;<\/h4>\n<p>\u5728\u591a\u7528\u6237\u5b9e\u6218\u6d4b\u8bd5\u4e2d&#xff0c;\u6211\u4eec\u901a\u5e38\u9700\u8981\u4e00\u4e2a\u8f85\u52a9\u8d26\u53f7\u3002\u4ee5 Ubuntu \u7cfb\u7edf\u4e3a\u4f8b&#xff0c;\u65b0\u5efa\u7528\u6237\u53ef\u4ee5\u4f7f\u7528 adduser \u547d\u4ee4\u3002\u5982\u679c\u5f53\u524d\u4e0d\u662f root \u7528\u6237&#xff0c;\u547d\u4ee4\u524d\u9700\u8981\u52a0\u4e0a sudo \u63d0\u6743&#xff1a;<\/p>\n<p><span class=\"token comment\"># root \u7528\u6237\u76f4\u63a5\u6267\u884c<\/span><br \/>\nadduser username<\/p>\n<p><span class=\"token comment\"># \u666e\u901a\u7528\u6237\u501f\u52a9 sudo \u6267\u884c<\/span><br \/>\n<span class=\"token function\">sudo<\/span> adduser username<\/p>\n<p>\u4ee5\u521b\u5efa\u540d\u4e3a vir \u7684\u6d4b\u8bd5\u7528\u6237\u4e3a\u4f8b&#xff1a;<\/p>\n<p>info: Adding user <span class=\"token variable\"><span class=\"token variable\">&#096;<\/span>vir&#039; <span class=\"token punctuation\">..<\/span>.<br \/>\ninfo: Selecting <span class=\"token environment constant\">UID<\/span>\/GID from range <span class=\"token number\">1000<\/span> to <span class=\"token number\">59999<\/span> <span class=\"token punctuation\">..<\/span>.<br \/>\ninfo: Adding new group <span class=\"token variable\">&#096;<\/span><\/span>vir<span class=\"token string\">&#039; (1004) &#8230;<br \/>\ninfo: Adding new user &#096;vir&#039;<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token number\">1004<\/span><span class=\"token punctuation\">)<\/span> with group <span class=\"token variable\"><span class=\"token variable\">&#096;<\/span>vir <span class=\"token punctuation\">(<\/span><span class=\"token number\">1004<\/span><span class=\"token punctuation\">)<\/span>&#039; <span class=\"token punctuation\">..<\/span>.<br \/>\ninfo: Creating home directory <span class=\"token variable\">&#096;<\/span><\/span>\/home\/vir<span class=\"token string\">&#039; &#8230;<br \/>\ninfo: Copying files from &#096;\/etc\/skel&#039;<\/span> <span class=\"token punctuation\">..<\/span>.<br \/>\nNew password:            \u2190 \u8f93\u5165\u5bc6\u7801&#xff08;\u7ec8\u7aef\u65e0\u56de\u663e\u662f\u6b63\u5e38\u7684&#xff09;<br \/>\nRetype new password:     \u2190 \u518d\u6b21\u8f93\u5165\u5bc6\u7801<br \/>\npasswd: password updated successfully<br \/>\nChanging the user information <span class=\"token keyword\">for<\/span> vir<br \/>\nEnter the new value, or press ENTER <span class=\"token keyword\">for<\/span> the default<br \/>\nFull Name <span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">]<\/span>:        \u2190 \u4e2a\u4eba\u4fe1\u606f\u56de\u8f66\u8df3\u8fc7\u5373\u53ef<br \/>\nRoom Number <span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">]<\/span>:<br \/>\nWork Phone <span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">]<\/span>:<br \/>\nHome Phone <span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">]<\/span>:<br \/>\nOther <span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">]<\/span>:<br \/>\nIs the information correct? <span class=\"token punctuation\">[<\/span>Y\/n<span class=\"token punctuation\">]<\/span> Y   \u2190 \u8f93\u5165 Y \u786e\u8ba4<br \/>\ninfo: Adding new user <span class=\"token variable\"><span class=\"token variable\">&#096;<\/span>vir&#039; to supplemental \/ extra <span class=\"token function\">groups<\/span> <span class=\"token variable\">&#096;<\/span><\/span>users&#039; <span class=\"token punctuation\">..<\/span>.<\/p>\n<p>\u7528\u6237\u521b\u5efa\u5b8c\u6210\u540e&#xff0c;\u7cfb\u7edf\u4f1a\u81ea\u52a8\u5b8c\u6210\u4ee5\u4e0b\u521d\u59cb\u5316\u5de5\u4f5c&#xff1a;<\/p>\n<ul>\n<li>\u4e3a\u5176\u5206\u914d\u552f\u4e00\u7684 UID&#xff08;\u7528\u6237\u6807\u8bc6&#xff09;\u548c GID&#xff08;\u7ec4\u6807\u8bc6&#xff09;&#xff1b;<\/li>\n<li>\u521b\u5efa\u4e0e\u7528\u6237\u540d\u540c\u540d\u7684\u521d\u59cb\u7528\u6237\u7ec4&#xff1b;<\/li>\n<li>\u5728 \/home\/ \u4e0b\u521b\u5efa\u7528\u6237\u4e13\u5c5e\u7684\u5bb6\u76ee\u5f55&#xff0c;\u5e76\u4ece\u6a21\u677f\u76ee\u5f55 \/etc\/skel \u62f7\u8d1d\u57fa\u7840\u914d\u7f6e\u6587\u4ef6\u3002<\/li>\n<\/ul>\n<p>\u26a0\ufe0f \u7ec8\u7aef\u7ec6\u8282\u63d0\u793a&#xff1a;<\/p>\n<ul>\n<li>Linux \u7ec8\u7aef\u5728\u8f93\u5165\u5bc6\u7801\u65f6\u4e0d\u663e\u793a\u4efb\u4f55\u5b57\u7b26\u3001\u661f\u53f7\u6216\u5149\u6807\u53d8\u52a8&#xff0c;\u8fd9\u662f\u9632\u6b62\u65c1\u4eba\u7aa5\u63a2\u5bc6\u7801\u957f\u5ea6\u7684\u5b89\u5168\u8bbe\u8ba1&#xff0c;\u6b63\u5e38\u8f93\u5165\u540e\u76f4\u63a5\u56de\u8f66\u5373\u53ef&#xff1b;<\/li>\n<li>UID \u548c GID \u901a\u5e38\u4ece 1000&#xff08;\u6216 CentOS \u4e2d\u7684 1000\/500&#xff09;\u5f00\u59cb\u5206\u914d&#xff0c;1000 \u4ee5\u4e0b\u7684\u7f16\u53f7\u4e00\u822c\u9884\u7559\u7ed9\u64cd\u4f5c\u7cfb\u7edf\u5185\u7f6e\u7684\u7cfb\u7edf\u670d\u52a1\u8d26\u53f7\u3002<\/li>\n<\/ul>\n<h4>2. \u7528\u6237\u5207\u6362&#xff1a;su \u4e0e su &#8211;<\/h4>\n<p>\u5728\u7ec8\u7aef\u4e2d\u5207\u6362\u7528\u6237\u8eab\u4efd\u53ef\u4ee5\u4f7f\u7528 su&#xff08;switch user&#xff09;&#xff1a;<\/p>\n<p><span class=\"token function\">su<\/span> username       <span class=\"token comment\"># \u5207\u6362\u7528\u6237&#xff0c;\u4f46\u4fdd\u7559\u5f53\u524d\u7684\u73af\u5883\u53d8\u91cf\u4e0e\u5de5\u4f5c\u76ee\u5f55<\/span><br \/>\n<span class=\"token function\">su<\/span> &#8211; username     <span class=\"token comment\"># \u5207\u6362\u7528\u6237&#xff0c;\u5e76\u540c\u65f6\u5207\u6362\u5230\u76ee\u6807\u7528\u6237\u7684\u5bb6\u76ee\u5f55\u548c\u767b\u5f55\u73af\u5883<\/span><\/p>\n<hr \/>\n<h2>\u4e8c\u3001\u6743\u9650\u7ba1\u7406\u4f53\u7cfb<\/h2>\n<h3>1. \u8bc6\u522b\u6587\u4ef6\u7c7b\u578b<\/h3>\n<p>\u5728\u7ec8\u7aef\u4e2d\u6267\u884c ls -l \u65f6&#xff0c;\u8f93\u51fa\u7ed3\u679c\u6700\u5de6\u4fa7\u7684\u4e00\u4e32\u5b57\u7b26\u76f4\u63a5\u51b3\u5b9a\u4e86\u8be5\u6587\u4ef6\u7684\u5c5e\u6027\u3002\u5176\u4e2d\u9996\u4e2a\u5b57\u7b26\u4e13\u95e8\u7528\u6765\u6807\u8bc6\u6587\u4ef6\u7c7b\u578b&#xff1a;<\/p>\n<table>\n<tr>\u7c7b\u578b\u6807\u8bc6\u7b26\u8bf4\u660e\u5e38\u89c1\u573a\u666f\u793a\u4f8b<\/tr>\n<tbody>\n<tr>\n<td align=\"left\">\u666e\u901a\u6587\u4ef6<\/td>\n<td align=\"center\">&#8211;<\/td>\n<td align=\"left\">\u5305\u542b\u6570\u636e\u3001\u6587\u672c\u6216\u4e8c\u8fdb\u5236\u6307\u4ee4\u7684\u6587\u4ef6<\/td>\n<td align=\"left\">.txt\u3001.c\u3001.sh\u3001\u7f16\u8bd1\u540e\u7684\u53ef\u6267\u884c\u6587\u4ef6<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">\u76ee\u5f55<\/td>\n<td align=\"center\">d<\/td>\n<td align=\"left\">\u5305\u542b\u6587\u4ef6\u540d\u4e0e\u5bf9\u5e94 inode \u6620\u5c04\u5173\u7cfb\u7684\u76ee\u5f55\u6587\u4ef6<\/td>\n<td align=\"left\">\/etc\u3001\/home\u3001\u5404\u7c7b\u6587\u4ef6\u5939<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">\u7b26\u53f7\u94fe\u63a5<\/td>\n<td align=\"center\">l<\/td>\n<td align=\"left\">\u7c7b\u4f3c\u4e8e Windows \u7684\u5feb\u6377\u65b9\u5f0f&#xff0c;\u6307\u5411\u53e6\u4e00\u4e2a\u8def\u5f84<\/td>\n<td align=\"left\">\/usr\/bin\/python -&gt; python3<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">\u5757\u8bbe\u5907<\/td>\n<td align=\"center\">b<\/td>\n<td align=\"left\">\u63d0\u4f9b\u5e26\u7f13\u5b58\u3001\u6309\u56fa\u5b9a\u6570\u636e\u5757\u968f\u673a\u8bfb\u5199\u8bbf\u95ee\u7684\u786c\u4ef6\u63a5\u53e3<\/td>\n<td align=\"left\">\u78c1\u76d8\u8bbe\u5907 \/dev\/sda\u3001\u5206\u533a \/dev\/sda1<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">\u5b57\u7b26\u8bbe\u5907<\/td>\n<td align=\"center\">c<\/td>\n<td align=\"left\">\u63d0\u4f9b\u65e0\u7f13\u51b2\u3001\u6309\u5b57\u7b26\u6d41\u987a\u5e8f\u987a\u5e8f\u8bfb\u5199\u7684\u786c\u4ef6\u63a5\u53e3<\/td>\n<td align=\"left\">\u7ec8\u7aef\u8bbe\u5907 \/dev\/tty\u3001\u7a7a\u8bbe\u5907 \/dev\/null<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">\u547d\u540d\u7ba1\u9053<\/td>\n<td align=\"center\">p<\/td>\n<td align=\"left\">\u7ba1\u9053\u6587\u4ef6&#xff0c;\u7528\u4e8e\u672c\u5730\u4e0d\u540c\u8fdb\u7a0b\u4e4b\u95f4\u901a\u4fe1&#xff08;FIFO&#xff09;<\/td>\n<td align=\"left\">mkfifo \u521b\u5efa\u7684\u901a\u4fe1\u6587\u4ef6<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">\u5957\u63a5\u5b57<\/td>\n<td align=\"center\">s<\/td>\n<td align=\"left\">\u7528\u4e8e\u7f51\u7edc\u6216\u672c\u5730\u8fdb\u7a0b\u95f4\u53cc\u5411\u901a\u4fe1\u7684\u7aef\u70b9<\/td>\n<td align=\"left\">MySQL \u5957\u63a5\u5b57 \/run\/mysqld\/mysqld.sock<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u5728\u5b9e\u6218\u73af\u5883\u4e0b\u89c2\u5bdf ls -l \u7684\u56de\u663e&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261108070113-6af01e397fa69.png\" alt=\"\" \/><\/p>\n<p>\u89c2\u5bdf\u622a\u56fe\u4e2d\u7ea2\u6846\u6807\u6ce8\u7684\u9996\u5b57\u7b26&#xff1a;<\/p>\n<ul>\n<li>mydir \u6700\u5f00\u5934\u7684\u5b57\u7b26\u662f d&#xff0c;\u8bf4\u660e\u5b83\u662f\u4e00\u4e2a\u76ee\u5f55&#xff1b;<\/li>\n<li>my.txt \u548c test.c \u6700\u5f00\u5934\u7684\u5b57\u7b26\u662f -&#xff0c;\u8bf4\u660e\u5b83\u4eec\u662f\u666e\u901a\u6587\u672c\/\u6e90\u7801\u6587\u4ef6\u3002<\/li>\n<\/ul>\n<h3>2. \u6743\u9650\u5c5e\u6027\u4e0e\u8bbf\u95ee\u8005\u7c7b\u578b<\/h3>\n<p>\u7d27\u968f\u6587\u4ef6\u7c7b\u578b\u5b57\u7b26\u4e4b\u540e\u7684 9 \u4e2a\u5b57\u7b26&#xff0c;\u5373\u4e3a\u8be5\u6587\u4ef6\u7684\u8bbf\u95ee\u6743\u9650\u4f4d\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261108070113-6af01e398d1cf.png\" alt=\"\" \/><\/p>\n<p>\u8fd9 9 \u4e2a\u5b57\u7b26\u56fa\u5b9a\u5206\u4e3a\u4e09\u7ec4&#xff0c;\u6bcf\u7ec4 3 \u4e2a\u5b57\u7b26&#xff0c;\u6309\u4ece\u5de6\u5230\u53f3\u7684\u987a\u5e8f\u4e25\u683c\u5bf9\u5e94\u4e09\u7c7b\u4e0d\u540c\u7684\u8bbf\u95ee\u8005\u89d2\u8272&#xff1a;<\/p>\n<li>\u62e5\u6709\u8005&#xff08;Owner \/ User&#xff0c;\u7b80\u5199 u&#xff09;&#xff1a;\u6587\u4ef6\u6216\u76ee\u5f55\u7684\u521b\u5efa\u8005\u6216\u5f53\u524d\u6240\u6709\u8005&#xff1b;<\/li>\n<li>\u6240\u5c5e\u7ec4&#xff08;Group&#xff0c;\u7b80\u5199 g&#xff09;&#xff1a;\u6587\u4ef6\u6240\u5c5e\u7684\u7528\u6237\u7ec4&#xff0c;\u7ec4\u5185\u7684\u6240\u6709\u7528\u6237\u5171\u4eab\u8be5\u7ec4\u8bbe\u5b9a\u7684\u6743\u9650&#xff1b;<\/li>\n<li>\u5176\u4ed6\u4eba&#xff08;Other&#xff0c;\u7b80\u5199 o&#xff09;&#xff1a;\u65e2\u4e0d\u662f\u6587\u4ef6\u62e5\u6709\u8005&#xff0c;\u4e5f\u4e0d\u5c5e\u4e8e\u6587\u4ef6\u6240\u5c5e\u7ec4\u7684\u4efb\u4f55\u5176\u4ed6\u7cfb\u7edf\u7528\u6237\u3002<\/li>\n<p>\u6bcf\u7ec4\u6743\u9650\u7531\u8bfb\u3001\u5199\u3001\u6267\u884c\u4e09\u4e2a\u57fa\u7840\u64cd\u4f5c\u4f4d\u6784\u6210&#xff1a;<\/p>\n<table>\n<tr>\u6743\u9650\u7b26\u53f7\u6743\u9650\u540d\u79f0\u516b\u8fdb\u5236\u6743\u91cd\u5bf9\u666e\u901a\u6587\u4ef6\u7684\u542b\u4e49\u5bf9\u76ee\u5f55\u6587\u4ef6\u7684\u542b\u4e49<\/tr>\n<tbody>\n<tr>\n<td align=\"center\">r<\/td>\n<td align=\"center\">\u8bfb&#xff08;Read&#xff09;<\/td>\n<td align=\"center\">4<\/td>\n<td align=\"left\">\u5141\u8bb8\u8bfb\u53d6\u5e76\u67e5\u770b\u6587\u4ef6\u5185\u5bb9&#xff08;\u5982 cat\u3001head&#xff09;<\/td>\n<td align=\"left\">\u5141\u8bb8\u8bfb\u53d6\u76ee\u5f55\u5217\u8868&#xff0c;\u67e5\u770b\u76ee\u5f55\u5185\u6587\u4ef6\u540d&#xff08;\u5982 ls&#xff09;<\/td>\n<\/tr>\n<tr>\n<td align=\"center\">w<\/td>\n<td align=\"center\">\u5199&#xff08;Write&#xff09;<\/td>\n<td align=\"center\">2<\/td>\n<td align=\"left\">\u5141\u8bb8\u4fee\u6539\u3001\u8986\u5199\u6216\u8ffd\u52a0\u6587\u4ef6\u5185\u5bb9<\/td>\n<td align=\"left\">\u5141\u8bb8\u5728\u76ee\u5f55\u5185\u65b0\u5efa\u3001\u79fb\u52a8\u3001\u91cd\u547d\u540d\u6216\u5220\u9664\u6587\u4ef6<\/td>\n<\/tr>\n<tr>\n<td align=\"center\">x<\/td>\n<td align=\"center\">\u6267\u884c&#xff08;Execute&#xff09;<\/td>\n<td align=\"center\">1<\/td>\n<td align=\"left\">\u5141\u8bb8\u5c06\u8be5\u6587\u4ef6\u4f5c\u4e3a\u53ef\u6267\u884c\u7a0b\u5e8f\u6216\u811a\u672c\u8f7d\u5165\u8fd0\u884c<\/td>\n<td align=\"left\">\u5141\u8bb8\u8fdb\u5165&#xff08;cd&#xff09;\u8be5\u76ee\u5f55&#xff0c;\u4ee5\u53ca\u8bbf\u95ee\u5176\u5185\u90e8\u6587\u4ef6\u7684\u5143\u6570\u636e<\/td>\n<\/tr>\n<tr>\n<td align=\"center\">&#8211;<\/td>\n<td align=\"center\">\u65e0\u6743\u9650<\/td>\n<td align=\"center\">0<\/td>\n<td align=\"left\">\u5728\u8be5\u4f4d\u7f6e\u4e0d\u5177\u5907\u5bf9\u5e94\u64cd\u4f5c\u6743\u9650<\/td>\n<td align=\"left\">\u5728\u8be5\u4f4d\u7f6e\u4e0d\u5177\u5907\u5bf9\u5e94\u64cd\u4f5c\u6743\u9650<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u6838\u5fc3\u8fa8\u6790&#xff1a;\u666e\u901a\u6587\u4ef6\u4e0e\u76ee\u5f55\u7684\u6743\u9650\u5dee\u5f02<\/p>\n<ul>\n<li>\u76ee\u5f55\u7684 x \u6743\u9650\u81f3\u5173\u91cd\u8981&#xff1a;\u82e5\u5bf9\u76ee\u5f55\u7f3a\u4e4f x \u6743\u9650&#xff0c;\u54ea\u6015\u62e5\u6709 r \u6743\u9650&#xff0c;\u7528\u6237\u4e5f\u53ea\u80fd\u52c9\u5f3a\u770b\u5230\u76ee\u5f55\u5185\u6709\u54ea\u4e9b\u6587\u4ef6\u540d&#xff0c;\u5374\u65e0\u6cd5 cd \u8fdb\u53bb&#xff0c;\u4e5f\u65e0\u6cd5\u8bfb\u53d6\u6587\u4ef6\u7684\u5927\u5c0f\u3001\u6743\u9650\u7b49\u5143\u6570\u636e&#xff08;\u6267\u884c ls -l \u4f1a\u51fa\u73b0\u5927\u91cf\u95ee\u53f7 ?&#xff09;\u3002<\/li>\n<li>\u5220\u9664\u6587\u4ef6\u7684\u6743\u9650\u5728\u76ee\u5f55&#xff0c;\u800c\u4e0d\u5728\u6587\u4ef6\u81ea\u8eab&#xff1a;\u7531\u4e8e\u6587\u4ef6\u540d\u4e0e\u5176\u5b58\u50a8\u4f4d\u7f6e\u8bb0\u5f55\u5728\u7236\u76ee\u5f55\u7684\u6620\u5c04\u8868\u4e2d&#xff0c;\u56e0\u6b64\u201c\u80fd\u5426\u5220\u9664\u4e00\u4e2a\u6587\u4ef6\u201d&#xff0c;\u5b8c\u5168\u53d6\u51b3\u4e8e\u7528\u6237\u5bf9\u8be5\u6587\u4ef6\u6240\u5728\u7236\u76ee\u5f55\u662f\u5426\u5177\u6709 w \u6743\u9650&#xff0c;\u4e0e\u8be5\u6587\u4ef6\u81ea\u8eab\u662f\u5426\u53ea\u8bfb\u65e0\u5173\u3002<\/li>\n<\/ul>\n<p>\u5728\u6743\u9650\u4f4d\u53f3\u4fa7&#xff0c;ls -l \u8fd8\u4f1a\u4f9d\u6b21\u5217\u51fa&#xff1a;<br \/>\n\u786c\u94fe\u63a5\u6570\u3001\u6587\u4ef6\u62e5\u6709\u8005\u3001\u6587\u4ef6\u6240\u5c5e\u7ec4\u3001\u6587\u4ef6\u5927\u5c0f\u3001\u6700\u540e\u4fee\u6539\u65f6\u95f4\u3001\u6587\u4ef6\u540d\u3002<\/p>\n<p>\u56e0\u4e3a\u6240\u6709\u4e0d\u5c5e\u4e8e\u201c\u62e5\u6709\u8005\u201d\u4e5f\u4e0d\u5c5e\u4e8e\u201c\u6240\u5c5e\u7ec4\u201d\u7684\u7528\u6237\u90fd\u5f52\u4e3a Other&#xff0c;\u6240\u4ee5\u5217\u8868\u9879\u4e2d\u65e0\u9700\u5355\u72ec\u6307\u5b9a Other \u7684\u7528\u6237\u540d\u3002<\/p>\n<h3>3. \u5b9e\u4f8b\u89e3\u6790&#xff1a;\u8bbf\u95ee\u8005\u7684\u6743\u9650\u547d\u4e2d\u4e0e\u62e6\u622a<\/h3>\n<p>\u4ee5\u6d4b\u8bd5\u73af\u5883\u4e2d\u7684\u6587\u4ef6\u7ed3\u6784\u4e3a\u4f8b&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261108070113-6af01e39995ec.png\" alt=\"\" \/><\/p>\n<p>\u89c2\u5bdf\u5f53\u524d\u76ee\u5f55 mydir \u4e0b\u4e09\u4e2a\u9879\u76ee\u7684\u6743\u9650\u4e0e\u5f52\u5c5e&#xff1a;<\/p>\n<ul>\n<li>\u76ee\u5f55 lib&#xff1a;\u6743\u9650 drwxrwxr-x&#xff0c;\u62e5\u6709\u8005 lzh&#xff0c;\u6240\u5c5e\u7ec4 lzh&#xff1b;<\/li>\n<li>\u666e\u901a\u6587\u4ef6 log.txt&#xff1a;\u6743\u9650 -rw-rw-r&#8211;&#xff0c;\u62e5\u6709\u8005 lzh&#xff0c;\u6240\u5c5e\u7ec4 lzh&#xff1b;<\/li>\n<li>\u76ee\u5f55 sever&#xff1a;\u6743\u9650 drwxrwxr-x&#xff0c;\u62e5\u6709\u8005 lzh&#xff0c;\u6240\u5c5e\u7ec4 lzh\u3002<\/li>\n<\/ul>\n<p>\u6b64\u65f6&#xff0c;\u5982\u679c\u5207\u6362\u5230\u4e4b\u524d\u65b0\u5efa\u7684\u666e\u901a\u7528\u6237 vir&#xff1a;<\/p>\n<ul>\n<li>vir \u4e0d\u662f\u62e5\u6709\u8005 lzh&#xff1b;<\/li>\n<li>vir \u6b64\u65f6\u4e5f\u5c1a\u672a\u52a0\u5165 lzh \u7ec4&#xff1b;<\/li>\n<li>\u56e0\u6b64\u7cfb\u7edf\u5728\u6743\u9650\u5339\u914d\u65f6&#xff0c;\u4f1a\u5224\u5b9a vir \u5c5e\u4e8e Other\u3002<\/li>\n<\/ul>\n<p>\u6839\u636e\u6743\u9650\u4f4d&#xff1a;<\/p>\n<ul>\n<li>lib \u5bf9 Other \u7684\u6743\u9650\u4e3a r-x&#xff08;\u5141\u8bb8\u6d4f\u89c8\u3001\u5141\u8bb8 cd \u8fdb\u5165&#xff0c;\u4f46\u4e0d\u5141\u8bb8\u5728\u5176\u5185\u65b0\u5efa\u6216\u5220\u9664\u6587\u4ef6&#xff09;&#xff1b;<\/li>\n<li>log.txt \u5bf9 Other \u7684\u6743\u9650\u4e3a r&#8211;&#xff08;\u5141\u8bb8\u8bfb\u53d6&#xff0c;\u7981\u6b62\u4fee\u6539\u5199\u5165&#xff09;\u3002<\/li>\n<\/ul>\n<p>\u6211\u4eec\u5728\u7ec8\u7aef\u4e2d\u5207\u6362\u5230 vir \u8fdb\u884c\u9a8c\u8bc1&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261108070113-6af01e39a6b71.png\" alt=\"\" \/><\/p>\n<p>\u6838\u5bf9\u7ec8\u7aef\u8f93\u51fa\u4e0e\u6279\u6ce8&#xff1a;<\/p>\n<li>vir \u6267\u884c cd lib\/ \u5e76\u8fd0\u884c ls -l&#xff0c;\u6210\u529f\u5217\u51fa\u4e86\u76ee\u5f55\u4e2d\u7684\u4e24\u4e2a\u6587\u4ef6 code.c \u548c mystring.h&#xff08;\u622a\u56fe\u6807\u6ce8\u201c\u53ef\u4ee5\u8fdb\u5165\u76ee\u5f55\u201d&#xff09;&#xff1b;<\/li>\n<li>\u968f\u540e vir \u5c1d\u8bd5\u6267\u884c\u5220\u9664\u64cd\u4f5c rm -f code.c&#xff0c;\u7ec8\u7aef\u7acb\u5373\u62a5\u9519&#xff1a;rm: cannot remove &#039;code.c&#039;: Permission denied&#xff08;\u622a\u56fe\u6807\u6ce8\u201c\u6ca1\u6709\u5220\u9664\u6743\u9650\u201d&#xff09;\u3002<\/li>\n<p>\u8fd9\u5370\u8bc1\u4e86\u524d\u8ff0\u673a\u5236&#xff1a;vir \u5bf9 lib \u53ea\u6709 r-x&#xff0c;\u7f3a\u5c11 w \u6743\u9650&#xff0c;\u56e0\u6b64\u65e0\u6cd5\u66f4\u6539 lib \u76ee\u5f55\u7684\u6570\u636e\u8868&#xff0c;\u5220\u9664\u64cd\u4f5c\u88ab\u7cfb\u7edf\u62e6\u622a\u3002<\/p>\n<hr \/>\n<h2>\u4e09\u3001\u6743\u9650\u4fee\u6539\u6307\u4ee4<\/h2>\n<p>\u5728\u638c\u63e1\u4e86\u6743\u9650\u7684\u5224\u5b9a\u89c4\u5219\u540e&#xff0c;\u5f53\u534f\u540c\u5f00\u53d1\u6216\u670d\u52a1\u90e8\u7f72\u9700\u8981\u8c03\u6574\u8bbf\u95ee\u8fb9\u754c\u65f6&#xff0c;\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u4e09\u4e2a\u6838\u5fc3\u547d\u4ee4\u5b8c\u6210\u6743\u9650\u4e0e\u6240\u6709\u6743\u7684\u53d8\u66f4\u3002<\/p>\n<h3>1. chmod&#xff1a;\u66f4\u6539\u6587\u4ef6\u6216\u76ee\u5f55\u6743\u9650<\/h3>\n<p>chmod&#xff08;change mode&#xff09;\u7528\u4e8e\u4fee\u6539\u6587\u4ef6\u6216\u76ee\u5f55\u7684\u8bbf\u95ee\u6743\u9650\u3002<\/p>\n<p>\u26a0\ufe0f \u64cd\u4f5c\u6743\u9650\u7ea6\u675f&#xff1a;\u5728 Linux \u4e2d&#xff0c;**\u53ea\u6709\u6587\u4ef6\u62e5\u6709\u8005&#xff08;Owner&#xff09;\u4e0e\u8d85\u7ea7\u7ba1\u7406\u5458&#xff08;root&#xff09;**\u624d\u62e5\u6709\u4fee\u6539\u6587\u4ef6\u6743\u9650\u7684\u8d44\u683c\u3002<\/p>\n<p>\u5e38\u7528\u9009\u9879&#xff1a;<\/p>\n<ul>\n<li>-R&#xff1a;\u9012\u5f52\u5904\u7406&#xff08;Recursive&#xff09;&#xff0c;\u5c06\u6307\u5b9a\u76ee\u5f55\u4e0b\u6240\u6709\u7684\u5b50\u76ee\u5f55\u53ca\u5185\u90e8\u6587\u4ef6\u4e00\u5e76\u4fee\u6539\u6743\u9650\u3002<\/li>\n<\/ul>\n<p>\u4fee\u6539\u6743\u9650\u4e3b\u8981\u6709\u4e24\u79cd\u8868\u8fbe\u6a21\u5f0f&#xff1a;\u6570\u5b57\u6a21\u5f0f\u4e0e\u7b26\u53f7\u6a21\u5f0f\u3002<\/p>\n<h4>a. \u6570\u5b57\u6a21\u5f0f&#xff08;\u516b\u8fdb\u5236\u6cd5&#xff09;<\/h4>\n<p>\u6570\u5b57\u6a21\u5f0f\u5c06\u6bcf\u79cd\u89d2\u8272\u7684\u6743\u9650\u503c\u8fdb\u884c\u7d2f\u52a0&#xff08;r&#061;4, w&#061;2, x&#061;1&#xff09;&#xff0c;\u5f62\u6210\u4e00\u4e2a 0&#xff5e;7 \u7684\u6570\u5b57&#xff0c;\u4e09\u7ec4\u89d2\u8272\u7ec4\u5408\u4e3a\u4e09\u4f4d\u6570\u5b57&#xff08;ugo&#xff09;&#xff1a;<\/p>\n<p><span class=\"token function\">chmod<\/span> <span class=\"token punctuation\">[<\/span>\u4e09\u4f4d\u516b\u8fdb\u5236\u6570\u5b57<span class=\"token punctuation\">]<\/span> \u6587\u4ef6\u6216\u76ee\u5f55<\/p>\n<table>\n<tr>\u6570\u5b57\u7ec4\u5408\u5bf9\u5e94\u6743\u9650\u7b26\u53f7\u5178\u578b\u9002\u7528\u573a\u666f<\/tr>\n<tbody>\n<tr>\n<td align=\"center\">755<\/td>\n<td align=\"center\">rwxr-xr-x<\/td>\n<td align=\"left\">\u53ef\u6267\u884c\u811a\u672c\u3001\u7cfb\u7edf\u7a0b\u5e8f\u3001\u5404\u7ea7\u516c\u5f00\u8bbf\u95ee\u7684\u76ee\u5f55<\/td>\n<\/tr>\n<tr>\n<td align=\"center\">644<\/td>\n<td align=\"center\">rw-r&#8211;r&#8211;<\/td>\n<td align=\"left\">\u6700\u5e38\u89c1\u7684\u666e\u901a\u6587\u672c\u6587\u4ef6\u3001\u6e90\u4ee3\u7801\u3001\u6587\u6863\u914d\u7f6e&#xff08;\u62e5\u6709\u8005\u53ef\u7f16\u8f91&#xff0c;\u5176\u4ed6\u4eba\u53ea\u8bfb&#xff09;<\/td>\n<\/tr>\n<tr>\n<td align=\"center\">600<\/td>\n<td align=\"center\">rw&#8212;&#8212;-<\/td>\n<td align=\"left\">\u673a\u5bc6\u914d\u7f6e\u6587\u4ef6\u3001SSH \u79c1\u94a5\u6587\u4ef6&#xff08;\u4ec5\u62e5\u6709\u8005\u53ef\u8bfb\u5199&#xff0c;\u9694\u7edd\u4e00\u5207\u5916\u90e8\u8bbf\u95ee&#xff09;<\/td>\n<\/tr>\n<tr>\n<td align=\"center\">700<\/td>\n<td align=\"center\">rwx&#8212;&#8212;<\/td>\n<td align=\"left\">\u4e2a\u4eba\u79c1\u6709\u811a\u672c\u6216\u79c1\u6709\u76ee\u5f55<\/td>\n<\/tr>\n<tr>\n<td align=\"center\">777<\/td>\n<td align=\"center\">rwxrwxrwx<\/td>\n<td align=\"left\">\u5f00\u653e\u5168\u90e8\u8bfb\u5199\u6267\u884c\u6743\u9650&#xff08;\u5b58\u5728\u4e25\u91cd\u5b89\u5168\u9690\u60a3&#xff0c;\u751f\u4ea7\u73af\u5883\u9700\u4e25\u683c\u89c4\u907f&#xff09;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>b. \u7b26\u53f7\u6a21\u5f0f&#xff08;\u5b57\u7b26\u52a0\u51cf\u6cd5&#xff09;<\/h4>\n<p>\u7b26\u53f7\u6a21\u5f0f\u901a\u8fc7\u76f4\u63a5\u6307\u5b9a\u89d2\u8272\u3001\u64cd\u4f5c\u7b26\u548c\u6743\u9650\u5b57\u7b26\u6765\u7cbe\u7ec6\u8c03\u6574&#xff1a;<\/p>\n<p><span class=\"token function\">chmod<\/span> <span class=\"token punctuation\">[<\/span>\u64cd\u4f5c\u5bf9\u8c61<span class=\"token punctuation\">]<\/span> <span class=\"token punctuation\">[<\/span>\u64cd\u4f5c\u7b26<span class=\"token punctuation\">]<\/span> <span class=\"token punctuation\">[<\/span>\u6743\u9650\u5b57\u7b26<span class=\"token punctuation\">]<\/span> \u6587\u4ef6\u6216\u76ee\u5f55<\/p>\n<ul>\n<li>\u64cd\u4f5c\u5bf9\u8c61&#xff1a;u&#xff08;\u5c5e\u4e3b&#xff09;\u3001g&#xff08;\u5c5e\u7ec4&#xff09;\u3001o&#xff08;\u5176\u4ed6\u4eba&#xff09;\u3001a&#xff08;\u6240\u6709\u4eba&#xff0c;all&#xff0c;\u7b49\u4ef7\u4e8e ugo&#xff09;<\/li>\n<li>\u64cd\u4f5c\u7b26&#xff1a;&#043;&#xff08;\u589e\u52a0\u6743\u9650&#xff09;\u3001-&#xff08;\u79fb\u9664\u6743\u9650&#xff09;\u3001&#061;&#xff08;\u8d4b\u4e88\u7cbe\u786e\u6743\u9650&#xff0c;\u5176\u4f59\u4f4d\u7f6e\u91cd\u7f6e\u4e3a\u65e0&#xff09;<\/li>\n<li>\u6743\u9650\u5b57\u7b26&#xff1a;r\u3001w\u3001x<\/li>\n<\/ul>\n<p><span class=\"token function\">chmod<\/span> u&#043;x script.sh          <span class=\"token comment\"># \u4ec5\u4e3a\u5c5e\u4e3b\u589e\u52a0\u53ef\u6267\u884c\u6743\u9650<\/span><br \/>\n<span class=\"token function\">chmod<\/span> go-w config.ini        <span class=\"token comment\"># \u79fb\u9664\u5c5e\u7ec4\u548c\u5176\u4ed6\u4eba\u7684\u5199\u6743\u9650<\/span><br \/>\n<span class=\"token function\">chmod<\/span> a&#043;r file.txt           <span class=\"token comment\"># \u4e3a\u6240\u6709\u7528\u6237\u6dfb\u52a0\u8bfb\u6743\u9650&#xff08;\u7b49\u540c\u4e8e chmod &#043;r file.txt&#xff09;<\/span><br \/>\n<span class=\"token function\">chmod<\/span> <span class=\"token assign-left variable\">u<\/span><span class=\"token operator\">&#061;<\/span>rwx,go<span class=\"token operator\">&#061;<\/span>rx mydir      <span class=\"token comment\"># \u7cbe\u786e\u8bbe\u5b9a\u5c5e\u4e3b rwx&#xff0c;\u5c5e\u7ec4\u53ca\u5176\u4ed6\u4eba rx<\/span><\/p>\n<h4>c. chmod \u5b9e\u6218\u6f14\u793a<\/h4>\n<p>\u57fa\u4e8e\u524d\u6587 vir \u7528\u6237\u88ab\u62e6\u622a\u7684\u573a\u666f&#xff0c;\u6211\u4eec\u901a\u8fc7\u62e5\u6709\u8005 lzh \u7ed9 lib \u76ee\u5f55\u7684 Other \u89d2\u8272\u8d4b\u4e88\u5199\u6743\u9650&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261108070113-6af01e39caa29.png\" alt=\"\" \/><\/p>\n<p>\u89c2\u5bdf\u622a\u56fe\u4e2d\u7684\u64cd\u4f5c\u6f14\u8fdb&#xff1a;<\/p>\n<li>lzh \u67e5\u770b\u5f53\u524d lib \u7684\u6743\u9650\u4e3a drwxrwxr-x&#xff08;\u7ea2\u6846\u6807\u6ce8&#xff09;&#xff0c;Other \u53ea\u6709\u8bfb\u548c\u8fdb\u5165\u6743\u9650&#xff1b;<\/li>\n<li>\u6267\u884c chmod o&#043;w -R lib&#xff08;\u7ea2\u6846\u6807\u6ce8&#xff09;&#xff0c;\u9012\u5f52\u4e3a Other \u6dfb\u52a0\u5199\u6743\u9650&#xff1b;<\/li>\n<li>\u518d\u6b21\u67e5\u770b ls -l&#xff0c;lib \u6743\u9650\u5df2\u53d8\u4e3a drwxrwxrwx&#xff08;\u7ea2\u6846\u6807\u6ce8&#xff09;&#xff1b;<\/li>\n<li>\u5207\u6362\u4e3a vir \u7528\u6237\u540e\u8fdb\u5165 lib&#xff0c;\u518d\u6b21\u6267\u884c rm -f code.c&#xff0c;\u5220\u9664\u547d\u4ee4\u987a\u5229\u901a\u8fc7&#xff0c;code.c \u4ece\u5217\u8868\u4e2d\u79fb\u9664\u3002<\/li>\n<p>\u7d27\u63a5\u7740&#xff0c;\u5728\u5177\u5907 wx \u6743\u9650\u7684 lib \u76ee\u5f55\u4e2d&#xff0c;vir \u4e5f\u53ef\u4ee5\u521b\u5efa\u5c5e\u4e8e\u81ea\u5df1\u7684\u65b0\u6587\u4ef6&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261108070114-6af01e3a049df.png\" alt=\"\" \/><\/p>\n<p>\u622a\u56fe\u4e2d vir \u6267\u884c touch vircode.c&#xff08;\u7ea2\u6846\u6807\u6ce8&#xff09;&#xff0c;\u751f\u6210\u7684 vircode.c \u5176\u62e5\u6709\u8005\u548c\u6240\u5c5e\u7ec4\u81ea\u7136\u4e3a vir:vir&#xff08;\u7ea2\u6846\u6807\u6ce8&#xff09;\u3002<\/p>\n<hr \/>\n<h3>2. chown&#xff1a;\u4fee\u6539\u6587\u4ef6\u62e5\u6709\u8005\u4e0e\u63d0\u6743\u5b9e\u6218<\/h3>\n<p>chown&#xff08;change owner&#xff09;\u7528\u4e8e\u6539\u53d8\u6587\u4ef6\u6216\u76ee\u5f55\u7684\u6240\u6709\u8005\u3002<\/p>\n<p><span class=\"token function\">chown<\/span> <span class=\"token punctuation\">[<\/span>\u9009\u9879<span class=\"token punctuation\">]<\/span> \u65b0\u62e5\u6709\u8005 \u6587\u4ef6\u540d<br \/>\n<span class=\"token function\">chown<\/span> <span class=\"token punctuation\">[<\/span>\u9009\u9879<span class=\"token punctuation\">]<\/span> \u65b0\u62e5\u6709\u8005:\u65b0\u6240\u5c5e\u7ec4 \u6587\u4ef6\u540d   <span class=\"token comment\"># \u53ef\u987a\u5e26\u4fee\u6539\u6240\u5c5e\u7ec4<\/span><\/p>\n<p>\u26a0\ufe0f \u4e3a\u4ec0\u4e48\u666e\u901a\u7528\u6237\u4e0d\u80fd\u628a\u81ea\u5df1\u7684\u6587\u4ef6 chown \u7ed9\u522b\u4eba&#xff1f;<br \/>\n\u5728 Linux \u9ed8\u8ba4\u5b89\u5168\u7b56\u7565\u4e0b&#xff0c;\u666e\u901a\u7528\u6237\u5373\u4f7f\u662f\u6587\u4ef6\u7684\u62e5\u6709\u8005&#xff0c;\u4e5f\u4e0d\u80fd\u5c06\u6587\u4ef6\u8d60\u9001\u7ed9\u5176\u4ed6\u7528\u6237\u3002\u56e0\u4e3a\u4e00\u65e6\u5141\u8bb8\u968f\u610f chown&#xff0c;\u6076\u610f\u7528\u6237\u53ef\u4ee5\u5360\u7528\u5927\u91cf\u78c1\u76d8\u914d\u989d\u540e\u5c06\u6587\u4ef6\u6240\u6709\u8005\u6539\u6210\u4ed6\u4eba\u8f6c\u5ac1\u914d\u989d&#xff0c;\u6216\u5236\u9020\u6076\u610f\u7a0b\u5e8f\u683d\u8d43\u3002\u56e0\u6b64&#xff0c;\u6267\u884c chown \u5fc5\u987b\u7531\u8d85\u7ea7\u7ba1\u7406\u5458&#xff08;root&#xff09;\u64cd\u4f5c&#xff0c;\u6216\u901a\u8fc7 sudo \u63d0\u6743\u6267\u884c\u3002<\/p>\n<p>\u6211\u4eec\u89c2\u5bdf vir \u7528\u6237\u76f4\u63a5\u5c1d\u8bd5\u4fee\u6539\u6240\u6709\u8005\u65f6\u7684\u7cfb\u7edf\u53cd\u9988&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261108070114-6af01e3a27a88.png\" alt=\"\" \/><\/p>\n<p>\u622a\u56fe\u4e2d&#xff1a;<\/p>\n<li>vir \u6267\u884c chown vir mystring.h&#xff0c;\u7cfb\u7edf\u62d2\u7edd&#xff1a;chown: changing ownership of &#039;mystring.h&#039;: Operation not permitted&#xff1b;<\/li>\n<li>vir \u5c1d\u8bd5\u5229\u7528 sudo chown vir mystring.h \u63d0\u6743&#xff0c;\u7cfb\u7edf\u7ed9\u51fa\u8b66\u544a&#xff1a;vir is not in the sudoers file\u3002<\/li>\n<p>\u539f\u56e0\u5256\u6790&#xff1a;Ubuntu \u9ed8\u8ba4\u53ea\u6709\u5904\u4e8e sudo \u7528\u6237\u7ec4\u4e2d\u7684\u6210\u5458\u624d\u5177\u5907\u63d0\u6743\u8d44\u8d28&#xff0c;\u65b0\u521b\u5efa\u7684 vir \u5c1a\u672a\u88ab\u52a0\u5165\u8be5\u7ec4\u3002<\/p>\n<p>\u89e3\u51b3\u65b9\u6848&#xff1a;\u5207\u6362\u56de\u5177\u5907\u7ba1\u7406\u5458\u6743\u9650\u7684\u8d26\u53f7 lzh&#xff0c;\u5c06 vir \u8ffd\u52a0\u5230 sudo \u7ec4\u4e2d&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261108070114-6af01e3a453b0.png\" alt=\"\" \/><\/p>\n<p>\u6838\u5bf9\u622a\u56fe\u4e2d\u7684\u4fee\u590d\u6d41\u7a0b&#xff1a;<\/p>\n<li>su lzh \u5207\u6362\u56de\u7ba1\u7406\u5458\u7528\u6237&#xff1b;<\/li>\n<li>\u6267\u884c sudo usermod -aG sudo vir&#xff08;\u7ea2\u6846\u6807\u6ce8&#xff0c;-aG \u4ee3\u8868\u5411\u9644\u52a0\u7ec4\u8ffd\u52a0&#xff0c;\u907f\u514d\u8986\u76d6\u539f\u6709\u9644\u52a0\u7ec4&#xff09;&#xff1b;<\/li>\n<li>\u6267\u884c newgrp sudo \u5237\u65b0\u7528\u6237\u7ec4\u51ed\u8bc1&#xff08;\u6216\u91cd\u65b0\u767b\u5f55\u7ec8\u7aef&#xff09;&#xff1b;<\/li>\n<li>\u5207\u56de vir \u540e\u6d4b\u8bd5 sudo whoami&#xff0c;\u7ec8\u7aef\u6b63\u786e\u6253\u5370\u51fa root&#xff0c;\u8868\u660e vir \u5df2\u6210\u529f\u83b7\u5f97\u7ba1\u7406\u5458\u63d0\u6743\u51ed\u8bc1\u3002<\/li>\n<p>\u968f\u540e\u518d\u6b21\u4fee\u6539\u6587\u4ef6\u5f52\u5c5e&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261108070114-6af01e3a77f21.png\" alt=\"\" \/><\/p>\n<p>vir \u6267\u884c sudo chown vir mystring.h \u540e&#xff0c;ls -l \u663e\u793a\u8be5\u6587\u4ef6\u7684\u62e5\u6709\u8005\u5df2\u4ece lzh&#xff08;\u7ea2\u6846\u6807\u6ce8&#xff09;\u6210\u529f\u53d8\u66f4\u4e3a vir&#xff08;\u7ea2\u6846\u6807\u6ce8&#xff09;\u3002<\/p>\n<hr \/>\n<h3>3. chgrp \u4e0e\u7ec4\u6743\u9650\u5339\u914d\u5b9e\u6218<\/h3>\n<p>chgrp&#xff08;change group&#xff09;\u7528\u4e8e\u4fee\u6539\u6587\u4ef6\u6216\u76ee\u5f55\u7684\u6240\u5c5e\u7ec4\u3002<\/p>\n<p><span class=\"token function\">chgrp<\/span> <span class=\"token punctuation\">[<\/span>\u9009\u9879<span class=\"token punctuation\">]<\/span> \u7ec4\u540d \u6587\u4ef6\u6216\u76ee\u5f55<\/p>\n<p>\u5728\u591a\u7528\u6237\u534f\u4f5c\u4e2d&#xff0c;\u7ec4\u6743\u9650\u5e38\u5e38\u5f15\u53d1\u56f0\u60d1&#xff1a;\u201c\u6211\u548c\u5f20\u4e09\u90fd\u5728\u540c\u4e00\u4e2a\u7528\u6237\u7ec4\u91cc&#xff0c;\u4e3a\u4ec0\u4e48\u6211\u8fd8\u662f\u65e0\u6cd5\u8bbf\u95ee\u4ed6\u7684\u6587\u4ef6&#xff1f;\u201d<\/p>\n<p>\u6211\u4eec\u5148\u67e5\u770b\u5f53\u524d\u7cfb\u7edf\u4e0b vir \u548c lzh \u5404\u81ea\u6240\u5728\u7684\u7ec4&#xff1a;<\/p>\n<p>vir&#064;VM-4-15-ubuntu:~\/Linux\/02_permission\/mydir\/lib$ <span class=\"token function\">groups<\/span> vir<br \/>\nvir <span class=\"token builtin class-name\">:<\/span> vir <span class=\"token function\">sudo<\/span> <span class=\"token function\">users<\/span><br \/>\nvir&#064;VM-4-15-ubuntu:~\/Linux\/02_permission\/mydir\/lib$ <span class=\"token function\">groups<\/span> lzh<br \/>\nlzh <span class=\"token builtin class-name\">:<\/span> lzh <span class=\"token function\">sudo<\/span> <span class=\"token function\">users<\/span> <span class=\"token function\">docker<\/span><\/p>\n<p>\u4e24\u4e2a\u7528\u6237\u90fd\u52a0\u5165\u4e86 sudo \u548c users \u7ec4\u3002\u4f46\u5982\u679c\u67e5\u770b mydir \u4e0b\u7684\u6587\u4ef6\u5c5e\u6027&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261108070114-6af01e3a9f286.png\" alt=\"\" \/><\/p>\n<p>\u8fd9\u4e9b\u6587\u4ef6\u7684\u6240\u5c5e\u7ec4\u662f lzh\u3002\u7cfb\u7edf\u5728\u8fdb\u884c\u6743\u9650\u5224\u5b9a\u65f6&#xff0c;\u68c0\u67e5\u7684\u662f&#xff1a;\u201c\u5f53\u524d\u8bbf\u95ee\u8005\u6240\u5728\u7684\u6240\u6709\u7ec4\u4e2d&#xff0c;\u662f\u5426\u5305\u542b\u8be5\u6587\u4ef6\u6240\u6307\u5b9a\u7684\u6240\u5c5e\u7ec4\u201d\u3002vir \u867d\u7136\u5728 users \u7ec4&#xff0c;\u4f46\u4e0d\u5728 lzh \u7ec4&#xff0c;\u56e0\u6b64\u6587\u4ef6\u7684\u201c\u7ec4\u6743\u9650\u201d\u5bf9 vir \u5b8c\u5168\u4e0d\u751f\u6548&#xff0c;vir \u4f9d\u7136\u53ea\u80fd\u88ab\u5f53\u4f5c Other\u3002<\/p>\n<p>\u6211\u4eec\u901a\u8fc7\u4e00\u4e2a\u53cd\u5411\u793a\u4f8b\u6df1\u5165\u9a8c\u8bc1\u6240\u5c5e\u7ec4\u7684\u4f5c\u7528\u673a\u5236&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261108070114-6af01e3ab377b.png\" alt=\"\" \/><\/p>\n<p>\u89c2\u5bdf\u622a\u56fe\u64cd\u4f5c&#xff1a;<\/p>\n<li>vir \u521b\u5efa\u7684\u6587\u4ef6 vircode.c&#xff0c;\u5176\u6743\u9650\u88ab\u8bbe\u7f6e\u4e3a -rw-rw&#8212;- 1 vir vir&#xff08;\u7ea2\u6846\u6807\u6ce8&#xff09;&#xff0c;\u5c5e\u4e3b\u6709\u8bfb\u5199\u3001\u5c5e\u7ec4\u6709\u8bfb\u5199&#xff0c;\u4f46 Other \u4e3a &#8212;&#xff08;\u6beb\u65e0\u6743\u9650&#xff09;&#xff1b;<\/li>\n<li>\u6b64\u65f6 lzh \u7528\u6237\u5c1d\u8bd5\u8bfb\u53d6&#xff1a;cat vircode.c&#xff0c;\u7cfb\u7edf\u76f4\u63a5\u62e6\u622a\u5e76\u62a5\u9519&#xff1a;cat: vircode.c: Permission denied\u3002\u56e0\u4e3a lzh \u4e0d\u5728 vir \u7ec4\u4e2d&#xff0c;\u88ab\u843d\u5165 Other \u89c4\u5219\u3002<\/li>\n<p>\u82e5\u8981\u8ba9 lzh \u5728\u4e0d\u7834\u574f Other \u9694\u79bb\u7684\u524d\u63d0\u4e0b\u8bbf\u95ee\u8be5\u6587\u4ef6&#xff0c;\u6b63\u89c4\u505a\u6cd5\u662f\u5c06 lzh \u52a0\u5165\u6587\u4ef6\u7684\u6240\u5c5e\u7ec4 vir&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261108070114-6af01e3adb48a.png\" alt=\"\" \/><\/p>\n<p>lzh \u8fd0\u884c sudo usermod -aG vir lzh&#xff0c;\u518d\u7528 groups lzh \u786e\u8ba4&#xff0c;\u5176\u9644\u52a0\u7ec4\u4e2d\u5df2\u987a\u5229\u5305\u542b vir&#xff08;\u7ea2\u6846\u6807\u6ce8&#xff09;\u3002<\/p>\n<p>\u7528\u6237\u91cd\u65b0\u767b\u5f55\u7ec8\u7aef\u52a0\u8f7d\u65b0\u7684\u7ec4\u8eab\u4efd\u540e&#xff0c;\u518d\u6b21\u53d1\u8d77\u8bbf\u95ee&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261108070114-6af01e3aee991.png\" alt=\"\" \/><\/p>\n<p>\u6b64\u65f6 vircode.c \u7684\u6743\u9650\u4f9d\u7136\u662f\u4e25\u683c\u7684 -rw-rw&#8212;-&#xff08;\u7ea2\u6846\u6807\u6ce8&#xff0c;Other \u4f9d\u7136\u65e0\u6743\u8bbf\u95ee&#xff09;\u3002\u4f46\u7cfb\u7edf\u5224\u5b9a lzh \u5c5e\u4e8e\u8be5\u6587\u4ef6\u7684\u6240\u5c5e\u7ec4 vir&#xff0c;\u4ece\u800c\u5339\u914d\u4e86\u7b2c 4&#xff5e;6 \u4f4d\u7684\u7ec4\u8bfb\u6743\u9650&#xff0c;cat vircode.c \u6210\u529f\u8f93\u51fa\u4e86\u6587\u4ef6\u5185\u5bb9&#xff1a;hello linux\u3002<\/p>\n<hr \/>\n<h2>\u56db\u3001\u9ed8\u8ba4\u6743\u9650\u751f\u6210\u673a\u5236&#xff1a;umask<\/h2>\n<p>\u5728 Linux \u4e2d&#xff0c;\u6bcf\u6b21\u65b0\u5efa\u6587\u4ef6\u6216\u76ee\u5f55\u65f6&#xff0c;\u6211\u4eec\u5e76\u6ca1\u6709\u624b\u52a8\u4e3a\u5176\u6307\u5b9a\u6743\u9650&#xff0c;\u4f46\u7cfb\u7edf\u603b\u4f1a\u8d4b\u4e88\u4e00\u4e2a\u521d\u503c&#xff08;\u5982\u76ee\u5f55\u901a\u5e38\u662f 755&#xff0c;\u666e\u901a\u6587\u4ef6\u901a\u5e38\u662f 644&#xff09;\u3002\u8fd9\u4e2a\u9ed8\u8ba4\u503c\u5e76\u975e\u968f\u610f\u751f\u6210&#xff0c;\u800c\u662f\u7531 umask&#xff08;\u7528\u6237\u63a9\u7801&#xff09; \u51b3\u5b9a\u7684\u3002<\/p>\n<h3>1. \u8d77\u59cb\u6743\u9650\u4e0e umask \u6982\u5ff5<\/h3>\n<p>\u7cfb\u7edf\u5bf9\u65b0\u5efa\u9879\u76ee\u9884\u8bbe\u4e86\u8d77\u59cb\u6743\u9650&#xff1a;<\/p>\n<ul>\n<li>\u666e\u901a\u6587\u4ef6&#xff1a;\u7531\u4e8e\u901a\u5e38\u4e0d\u9700\u8981\u76f4\u63a5\u6267\u884c&#xff0c;\u51fa\u4e8e\u5b89\u5168\u8003\u8651&#xff0c;\u7cfb\u7edf\u9884\u8bbe\u7684\u6700\u5927\u8d77\u59cb\u6743\u9650\u4e3a 666&#xff08;\u5373 rw-rw-rw-&#xff0c;\u9ed8\u8ba4\u5265\u79bb\u6267\u884c\u6743\u9650 x&#xff09;&#xff1b;<\/li>\n<li>\u76ee\u5f55\u6587\u4ef6&#xff1a;\u56e0\u4e3a\u76ee\u5f55\u5fc5\u987b\u5177\u5907 x \u6743\u9650\u624d\u80fd\u8fdb\u5165\u6d4f\u89c8&#xff0c;\u7cfb\u7edf\u9884\u8bbe\u7684\u6700\u5927\u8d77\u59cb\u6743\u9650\u4e3a 777&#xff08;\u5373 rwxrwxrwx&#xff09;\u3002<\/li>\n<\/ul>\n<p>umask \u7684\u4f5c\u7528\u5c31\u50cf\u4e00\u5f20\u7b5b\u5b50&#xff0c;\u5176\u6570\u503c\u4ee3\u8868\u5728\u521b\u5efa\u65f6\u9700\u8981\u4ece\u8d77\u59cb\u6743\u9650\u4e2d\u5265\u79bb\u6389\u7684\u6743\u9650\u4f4d\u3002<\/p>\n<h3>2. \u4e25\u8c28\u7684\u6570\u5b66\u903b\u8f91&#xff1a;\u6309\u4f4d\u4e0e\u975e<\/h3>\n<p>\u5e38\u89c1\u6559\u7a0b\u4e2d\u5e38\u628a\u8ba1\u7b97\u7b80\u5316\u4e3a\u201c\u8d77\u59cb\u6743\u9650\u51cf\u53bb umask\u201d&#xff0c;\u4f46\u5728\u7279\u5b9a\u975e\u5bf9\u79f0\u63a9\u7801\u4e0b&#xff0c;\u7b97\u672f\u51cf\u6cd5\u53ef\u80fd\u5f97\u51fa\u9519\u8bef\u7ed3\u8bba\u3002\u5728\u5185\u6838\u5c42\u9762\u4e0a&#xff0c;\u771f\u5b9e\u7684\u8fd0\u7b97\u903b\u8f91\u662f\u6309\u4f4d\u4e0e\u975e&#xff08;Bitwise AND NOT&#xff09;&#xff1a;<\/p>\n<p><span class=\"katex--display\"><span class=\"katex-display\"><span class=\"katex\"><span class=\"katex-mathml\">\u6700\u7ec8\u6743\u9650&#061;\u8d77\u59cb\u6743\u9650\u00a0&amp;\u00a0(\u223cumask)\\\\text{\u6700\u7ec8\u6743\u9650} &#061; \\\\text{\u8d77\u59cb\u6743\u9650} \\\\ \\\\&amp; \\\\ (\\\\sim\\\\text{umask})<\/span><span class=\"katex-html\"><span class=\"base\"><span class=\"strut\" style=\"height: 0.6833em\"><\/span><span class=\"mord text\"><span class=\"mord cjk_fallback\">\u6700\u7ec8\u6743\u9650<\/span><\/span><span class=\"mspace\" style=\"margin-right: 0.2778em\"><\/span><span class=\"mrel\">&#061;<\/span><span class=\"mspace\" style=\"margin-right: 0.2778em\"><\/span><\/span><span class=\"base\"><span class=\"strut\" style=\"height: 1em;vertical-align: -0.25em\"><\/span><span class=\"mord text\"><span class=\"mord cjk_fallback\">\u8d77\u59cb\u6743\u9650<\/span><\/span><span class=\"mspace\">\u00a0<\/span><span class=\"mord\">&amp;<\/span><span class=\"mspace\">\u00a0<\/span><span class=\"mopen\">(<\/span><span class=\"mrel\">\u223c<\/span><span class=\"mspace\" style=\"margin-right: 0.2778em\"><\/span><\/span><span class=\"base\"><span class=\"strut\" style=\"height: 1em;vertical-align: -0.25em\"><\/span><span class=\"mord text\"><span class=\"mord\">umask<\/span><\/span><span class=\"mclose\">)<\/span><\/span><\/span><\/span><\/span><\/span><\/p>\n<p>\u5373&#xff1a;\u5c06 umask \u53d6\u53cd\u4e4b\u540e&#xff0c;\u4e0e\u8d77\u59cb\u6743\u9650\u8fdb\u884c\u4e8c\u8fdb\u5236\u201c\u4e0e\u201d\u8fd0\u7b97<br \/>\n\u51e1\u662f\u5728 umask \u5bf9\u5e94\u4f4d\u7f6e\u4e3a 1 \u7684\u4f4d&#xff0c;\u6700\u7ec8\u6743\u9650\u4e2d\u4e00\u5f8b\u88ab\u6e05\u6d17\u7f6e 0\u3002<\/p>\n<p>\u4ee5\u5e38\u89c4\u7684 umask &#061; 022 \u4e3a\u4f8b&#xff1a;<\/p>\n<ul>\n<li>022 \u7684\u4e8c\u8fdb\u5236\u8868\u793a\u4e3a&#xff1a;000 010 010&#xff0c;\u4ee3\u8868\u7ec4\u548c\u5176\u4ed6\u4eba\u7684\u5199\u6743\u9650&#xff08;w&#xff09;\u5fc5\u987b\u88ab\u62ff\u6389&#xff1b;<\/li>\n<li>\u6587\u4ef6\u6700\u7ec8\u6743\u9650&#xff1a;666 &amp; ~022 &#061; 644&#xff08;rw-r&#8211;r&#8211;&#xff09;&#xff1b;<\/li>\n<li>\u76ee\u5f55\u6700\u7ec8\u6743\u9650&#xff1a;777 &amp; ~022 &#061; 755&#xff08;rwxr-xr-x&#xff09;\u3002<\/li>\n<\/ul>\n<h3>3. \u5b9e\u6218\u67e5\u770b\u4e0e\u9a8c\u8bc1<\/h3>\n<p>\u5728\u5f53\u524d Shell \u7ec8\u7aef\u4e2d\u76f4\u63a5\u8fd0\u884c umask \u5373\u53ef\u67e5\u770b\u5f53\u524d\u63a9\u7801&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261108070115-6af01e3b1033e.png\" alt=\"\" \/><\/p>\n<p>\u622a\u56fe\u4e2d\u8f93\u51fa\u4e3a 0002&#xff08;\u7b2c\u4e00\u4f4d\u662f\u7279\u6b8a\u6743\u9650\u63a9\u7801&#xff0c;\u540e\u4e09\u4f4d\u4ee3\u8868\u666e\u901a\u63a9\u7801 002&#xff09;\u3002<\/p>\n<p>\u6839\u636e\u8ba1\u7b97\u89c4\u5219&#xff0c;\u5f53 umask &#061; 002 \u65f6&#xff1a;<\/p>\n<ul>\n<li>\u6587\u4ef6\u6700\u7ec8\u6743\u9650&#xff1a;666 &amp; ~002 &#061; 664&#xff08;rw-rw-r&#8211;&#xff0c;\u5c5e\u4e3b\u4e0e\u5c5e\u7ec4\u5747\u53ef\u8bfb\u5199&#xff0c;\u5176\u4ed6\u4eba\u53ea\u8bfb&#xff09;&#xff1b;<\/li>\n<li>\u76ee\u5f55\u6700\u7ec8\u6743\u9650&#xff1a;777 &amp; ~002 &#061; 775&#xff08;rwxrwxr-x&#xff0c;\u5c5e\u4e3b\u4e0e\u5c5e\u7ec4\u5177\u5907\u5b8c\u6574\u6743\u9650&#xff0c;\u5176\u4ed6\u4eba\u4e0d\u53ef\u5199&#xff09;\u3002<\/li>\n<\/ul>\n<p>\u6211\u4eec\u65b0\u5efa\u9879\u76ee\u8fdb\u884c\u9a8c\u8bc1&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261108070115-6af01e3b1e640.png\" alt=\"\" \/><\/p>\n<p>\u622a\u56fe\u4e2d\u6267\u884c mkdir test\/ \u4e0e touch temp.txt&#xff1a;<\/p>\n<ul>\n<li>temp.txt \u6743\u9650\u4e3a -rw-rw-r&#8211;&#xff08;664&#xff0c;\u7ea2\u6846\u6807\u6ce8&#xff09;&#xff1b;<\/li>\n<li>test \u76ee\u5f55\u6743\u9650\u4e3a drwxrwxr-x&#xff08;775&#xff0c;\u7ea2\u6846\u6807\u6ce8&#xff09;&#xff1b;<\/li>\n<li>\u5b9e\u9645\u7ed3\u679c\u4e0e\u4f4d\u8fd0\u7b97\u63a8\u5bfc\u5b8c\u5168\u543b\u5408\u3002<\/li>\n<\/ul>\n<p>\u5982\u9700\u8c03\u6574\u63a9\u7801&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u4e34\u65f6\u8c03\u6574&#xff08;\u4ec5\u5728\u5f53\u524d Shell \u4f1a\u8bdd\u4e2d\u751f\u6548&#xff09;<\/span><br \/>\n<span class=\"token builtin class-name\">umask<\/span> 022<\/p>\n<p><span class=\"token comment\"># \u6c38\u4e45\u8c03\u6574&#xff1a;\u5199\u5165\u7528\u6237\u7684 Shell \u73af\u5883\u914d\u7f6e\u6587\u4ef6<\/span><br \/>\n<span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;umask 022&#034;<\/span> <span class=\"token operator\">&gt;&gt;<\/span> ~\/.bashrc<br \/>\n<span class=\"token builtin class-name\">source<\/span> ~\/.bashrc<\/p>\n<hr \/>\n<h2>\u4e94\u3001\u5171\u4eab\u76ee\u5f55\u4e0e\u9632\u8bef\u5220\u9632\u7ebf&#xff1a;\u7c98\u6ede\u4f4d&#xff08;Sticky Bit&#xff09;<\/h2>\n<p>\u56de\u987e\u524d\u9762\u5b66\u5230\u7684\u76ee\u5f55\u6743\u9650\u673a\u5236&#xff1a;\u4e00\u4e2a\u7528\u6237\u80fd\u5426\u5220\u9664\u76ee\u5f55\u4e0b\u7684\u6587\u4ef6&#xff0c;\u53d6\u51b3\u4e8e\u8be5\u7528\u6237\u5bf9\u8be5\u76ee\u5f55\u662f\u5426\u5177\u5907 w \u6743\u9650\u3002<\/p>\n<p>\u8fd9\u5f15\u53d1\u4e86\u4e00\u4e2a\u7ecf\u5178\u7684\u7cfb\u7edf\u5b89\u5168\u96be\u9898&#xff1a;<br \/>\n\u5728\u591a\u4eba\u534f\u4f5c\u670d\u52a1\u5668\u4e2d&#xff0c;\u5f80\u5f80\u9700\u8981\u4e00\u4e2a\u516c\u5171\u4e34\u65f6\u5171\u4eab\u76ee\u5f55&#xff08;\u4f8b\u5982\u7cfb\u7edf\u7684 \/tmp&#xff09;\u3002\u4e3a\u4e86\u8ba9\u6240\u6709\u4eba\u90fd\u80fd\u5728\u91cc\u9762\u5b58\u53d6\u6587\u4ef6&#xff0c;\u8fd9\u4e2a\u76ee\u5f55\u5fc5\u987b\u5411\u6240\u6709\u4eba\u5f00\u653e\u5199\u6743\u9650&#xff08;drwxrwxrwx&#xff09;\u3002<br \/>\n\u4f46\u662f&#xff0c;\u4e00\u65e6\u76ee\u5f55\u5bf9 Other \u5f00\u653e\u4e86 w \u6743\u9650&#xff0c;\u4efb\u4f55\u666e\u901a\u7528\u6237\u90fd\u53ef\u4ee5\u968f\u5fc3\u6240\u6b32\u5730\u5220\u6389\u5176\u4ed6\u4efb\u4f55\u4eba\u521b\u5efa\u7684\u6587\u4ef6\u3002<\/p>\n<p>\u4e3a\u4e86\u76f4\u89c2\u4f53\u4f1a\u8fd9\u4e00\u9690\u60a3&#xff0c;\u6211\u4eec\u6765\u770b\u4e00\u7ec4\u8fde\u7eed\u6d4b\u8bd5\u3002<\/p>\n<h3>1. \u591a\u5c42\u6743\u9650\u9012\u8fdb\u5b9e\u9a8c<\/h3>\n<p>lzh \u521b\u5efa\u4e86\u76ee\u5f55 ldir&#xff0c;\u5e76\u5728\u5176\u4e2d\u653e\u5165\u4e86\u6587\u4ef6 mycode.c\u3002\u6b64\u65f6 vir \u7528\u6237\u5c1d\u8bd5\u5f3a\u884c\u5220\u9664\u8be5\u76ee\u5f55&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261108070115-6af01e3b412b3.png\" alt=\"\" \/><\/p>\n<p>\u622a\u56fe\u4e2d vir \u6267\u884c rm -rf .\/ldir\/&#xff0c;\u7cfb\u7edf\u62a5\u9519&#xff1a;rm: cannot remove &#039;.\/ldir\/mycode.c&#039;: Permission denied&#xff08;\u7ea2\u6846\u6807\u6ce8&#xff09;\u3002<br \/>\n\u539f\u56e0\u5728\u4e8e\u6b64\u65f6 ldir \u7684 Other \u6743\u9650\u4ec5\u4e3a r-x&#xff0c;\u6ca1\u6709\u5199\u6743\u9650&#xff0c;vir \u65e0\u6cd5\u6e05\u7406\u5176\u5185\u90e8\u7684\u6587\u4ef6\u3002<\/p>\n<p>\u968f\u540e&#xff0c;\u62e5\u6709\u8005 lzh \u7ed9 ldir \u52a0\u4e0a\u4e86 Other \u7684\u5199\u6743\u9650&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261108070115-6af01e3b68e49.png\" alt=\"\" \/><\/p>\n<p>\u622a\u56fe\u4e2d lzh \u6267\u884c chmod o&#043;w ldir \u540e&#xff0c;ldir \u6743\u9650\u53d8\u4e3a drwxrwxrwx\u3002<br \/>\n\u6b64\u65f6 vir \u518d\u6b21\u5c1d\u8bd5 rm -rf .\/ldir\/&#xff0c;\u7ec8\u7aef\u4f9d\u7136\u62a5\u9519&#xff1a;rm: cannot remove &#039;.\/ldir\/&#039;: Permission denied&#xff08;\u7ea2\u6846\u6807\u6ce8&#xff09;\u3002<\/p>\n<p>\u6838\u5fc3\u5256\u6790&#xff1a;\u4e3a\u4ec0\u4e48\u76ee\u5f55\u672c\u8eab\u65e0\u6cd5\u88ab\u5220&#xff1f;<br \/>\nrm -rf .\/ldir\/ \u662f\u4e00\u4e2a\u590d\u5408\u64cd\u4f5c&#xff1a;<\/p>\n<li>\u5148\u5220\u9664 ldir \u5185\u90e8\u7684\u5b50\u9879 mycode.c \u2014\u2014 \u7531\u4e8e ldir \u5df2\u7ecf\u662f 777 \u6743\u9650&#xff0c;\u8fd9\u4e00\u6b65\u539f\u672c\u53ef\u4ee5\u6210\u529f&#xff1b;<\/li>\n<li>\u63a5\u7740\u5fc5\u987b\u4ece ldir \u7684**\u4e0a\u5c42\u7236\u76ee\u5f55&#xff08;\u5373 mydir&#xff09;**\u4e2d\u628a ldir \u8fd9\u4e2a\u76ee\u5f55\u8282\u70b9\u62b9\u53bb\u3002<br \/>\n\u7531\u4e8e\u6b64\u65f6\u7236\u76ee\u5f55 mydir \u5bf9 Other \u4f9d\u7136\u6ca1\u6709\u5199\u6743\u9650&#xff0c;\u56e0\u6b64\u6700\u540e\u4e00\u6b65\u88ab\u575a\u51b3\u62e6\u622a&#xff01;<\/li>\n<p>\u53ea\u6709\u5f53\u62e5\u6709\u8005\u8fde\u540c\u7236\u76ee\u5f55 mydir \u4e00\u5e76\u5f00\u653e Other \u5199\u6743\u9650\u540e&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261108070115-6af01e3b935c7.png\" alt=\"\" \/><\/p>\n<p>\u7236\u76ee\u5f55 mydir \u52a0\u4e0a w \u6743\u9650\u540e&#xff08;\u622a\u56fe\u6807\u6ce8\u201c\u7236\u76ee\u5f55\u52a0\u4e0aw\u6743\u9650\u4e4b\u540e\u5c31\u80fd\u591f\u5220\u9664\u5f53\u524d\u76ee\u5f55\u672c\u8eab&#xff01;\u201d&#xff09;&#xff0c;vir \u518d\u6b21\u8fd0\u884c rm -rf .\/ldir\/&#xff0c;\u76ee\u5f55\u8fde\u540c\u5185\u90e8\u6240\u6709\u6587\u4ef6\u77ac\u95f4\u88ab\u5f7b\u5e95\u5220\u9664\u3002<\/p>\n<p>\u8fd9\u5c31\u628a\u5b89\u5168\u9690\u60a3\u5f7b\u5e95\u66b4\u9732\u51fa\u6765\u4e86&#xff1a;\u53ea\u8981\u5171\u4eab\u76ee\u5f55\u5177\u6709\u5199\u6743\u9650&#xff0c;\u4efb\u610f\u7528\u6237\u7684\u52b3\u52a8\u6210\u679c\u90fd\u9762\u4e34\u88ab\u4ed6\u4eba\u6076\u610f\u5220\u9664\u6216\u8bef\u5220\u7684\u98ce\u9669\u3002<\/p>\n<h3>2. \u7c98\u6ede\u4f4d\u7684\u4f5c\u7528\u4e0e\u673a\u5236<\/h3>\n<p>\u4e3a\u4e86\u5f7b\u5e95\u89e3\u51b3\u201c\u516c\u5171\u76ee\u5f55\u53ef\u81ea\u7531\u521b\u5efa\u3001\u4f46\u4e0d\u53ef\u968f\u610f\u4e92\u5220\u201d\u7684\u77db\u76fe&#xff0c;Linux \u5f15\u5165\u4e86\u7279\u6b8a\u6743\u9650\u2014\u2014\u7c98\u6ede\u4f4d&#xff08;Sticky Bit&#xff09;\u3002<\/p>\n<p>\u7c98\u6ede\u4f4d\u6838\u5fc3\u4fdd\u62a4\u89c4\u5219&#xff1a;<br \/>\n\u5f53\u4e00\u4e2a\u76ee\u5f55\u88ab\u8d4b\u4e88\u7c98\u6ede\u4f4d\u540e&#xff0c;\u5373\u4f7f\u8be5\u76ee\u5f55\u5bf9\u6240\u6709\u4eba\u5f00\u653e\u4e86\u5199\u6743\u9650&#xff08;w&#xff09;&#xff0c;\u8be5\u76ee\u5f55\u4e0b\u7684\u6587\u4ef6\u548c\u5b50\u76ee\u5f55\u4e5f\u53ea\u80fd\u7531\u4ee5\u4e0b\u4e09\u7c7b\u4eba\u5220\u9664\u6216\u91cd\u547d\u540d&#xff1a;<\/p>\n<li>\u8d85\u7ea7\u7ba1\u7406\u5458&#xff08;root&#xff09;&#xff1b;<\/li>\n<li>\u8be5\u5171\u4eab\u76ee\u5f55\u7684\u62e5\u6709\u8005&#xff1b;<\/li>\n<li>\u8be5\u6587\u4ef6\u81ea\u8eab\u7684\u62e5\u6709\u8005\u3002<br \/>\n\u9664\u6b64\u4e4b\u5916\u7684\u4efb\u4f55\u5176\u4ed6\u4eba&#xff0c;\u54ea\u6015\u62e5\u6709\u76ee\u5f55\u7684 w \u6743\u9650&#xff0c;\u4e5f\u65e0\u6743\u5220\u9664\u4ed6\u4eba\u7684\u6587\u4ef6\u3002<\/li>\n<p>\u8bbe\u7f6e\u7c98\u6ede\u4f4d\u4f7f\u7528 chmod &#043;t&#xff08;\u516b\u8fdb\u5236\u6a21\u5f0f\u4e3a\u7b2c\u4e00\u4f4d\u8d4b\u4e88 1&#xff0c;\u5982 chmod 1777 \u76ee\u5f55&#xff09;&#xff1a;<\/p>\n<p><span class=\"token function\">chmod<\/span> &#043;t \u76ee\u5f55\u540d<\/p>\n<p>\u5728\u6d4b\u8bd5\u73af\u5883\u4e2d\u7ed9\u5171\u4eab\u76ee\u5f55\u8d4b\u4e88\u7c98\u6ede\u4f4d&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261108070115-6af01e3bda315.png\" alt=\"\" \/><\/p>\n<p>\u89c2\u5bdf\u622a\u56fe\u4e2d\u7684\u5173\u952e\u53d8\u5316&#xff1a;<\/p>\n<li>lzh \u6267\u884c chmod &#043;t .\/ldir\/&#xff08;\u7ea2\u6846\u6807\u6ce8&#xff09;&#xff0c;ldir \u6743\u9650\u6700\u672b\u5c3e\u7684 x \u53d8\u6210\u4e86 t&#xff08;\u72b6\u6001\u663e\u793a\u4e3a drwxrwxrwt&#xff09;&#xff1b;<\/li>\n<li>\u968f\u540e vir \u518d\u6b21\u5c1d\u8bd5\u8de8\u6743\u9650\u5220\u9664&#xff1a;rm -rf .\/ldir\/&#xff1b;<\/li>\n<li>\u7ec8\u7aef\u7684\u62a5\u9519\u4fe1\u606f\u7531\u539f\u672c\u7684 Permission denied \u53d8\u4e3a\u4e86 Operation not permitted&#xff08;\u7ea2\u6846\u6807\u6ce8&#xff09;&#xff0c;\u5220\u9664\u884c\u4e3a\u88ab\u7c98\u6ede\u4f4d\u673a\u5236\u7cbe\u51c6\u5236\u6b62&#xff01;<\/li>\n<p>\u751f\u4ea7\u73af\u5883\u5178\u8303&#xff1a;<br \/>\n\u67e5\u770b Linux \u6839\u76ee\u5f55\u4e0b\u7684 \/tmp \u76ee\u5f55&#xff1a;<\/p>\n<p><span class=\"token function\">ls<\/span> <span class=\"token parameter variable\">-ld<\/span> \/tmp<br \/>\n<span class=\"token comment\"># \u8f93\u51fa&#xff1a;drwxrwxrwt &#8230; \/tmp<\/span><\/p>\n<p>\u7cfb\u7edf\u4e2d\u7684\u6240\u6709\u7a0b\u5e8f\u548c\u666e\u901a\u7528\u6237\u90fd\u53ef\u4ee5\u5728 \/tmp \u5b58\u653e\u4e34\u65f6\u7f13\u5b58&#xff0c;\u4f46\u4efb\u4f55\u4eba\u53ea\u80fd\u6e05\u7406\u81ea\u5df1\u751f\u6210\u7684\u6587\u4ef6&#xff0c;\u7edd\u4e0d\u53ef\u80fd\u8bef\u5220\u7cfb\u7edf\u7684\u5173\u952e\u5957\u63a5\u5b57\u6216\u5176\u4ed6\u7528\u6237\u7684\u4e34\u65f6\u6570\u636e\u3002\u8fd9\u6b63\u662f\u7c98\u6ede\u4f4d\u5728\u73b0\u4ee3 Linux \u7cfb\u7edf\u4e2d\u6700\u57fa\u7840\u3001\u4e5f\u662f\u6700\u91cd\u8981\u7684\u5de5\u7a0b\u843d\u5730\u3002<\/p>\n<hr \/>\n<h2>\u516d\u3001\u603b\u7ed3\u4e0e\u6743\u9650\u81ea\u67e5\u5fc3\u6cd5<\/h2>\n<p>\u6574\u7bc7\u68b3\u7406\u4e0b\u6765&#xff0c;Linux \u6743\u9650\u7684\u672c\u8d28\u662f\u4e00\u5957\u5c42\u6b21\u5206\u660e\u3001\u5c31\u8fd1\u5339\u914d\u7684\u8bbf\u95ee\u63a7\u5236\u89c4\u5219<br \/>\n\u65e5\u5e38\u9047\u5230\u6743\u9650\u62a5\u9519\u65f6&#xff0c;\u53ef\u4ee5\u6309\u7167\u4ee5\u4e0b\u903b\u8f91\u5feb\u901f\u81ea\u67e5&#xff1a;<\/p>\n<li>\u786e\u5b9a\u8eab\u4efd\u5c42\u6b21&#xff1a;\n<ul>\n<li>\u4f18\u5148\u68c0\u67e5\u8bbf\u95ee\u8005\u662f\u6587\u4ef6\u7684 Owner\u3001Group \u6210\u5458 \u8fd8\u662f Other\u3002\u7cfb\u7edf\u6309\u8be5\u987a\u5e8f\u547d\u4e2d\u7b2c\u4e00\u7c7b\u5339\u914d\u9879\u540e\u7acb\u5373\u5e94\u7528\u5bf9\u5e94\u6743\u9650&#xff0c;\u540e\u7eed\u6743\u9650\u4f4d\u4e0d\u518d\u53c2\u4e0e\u8ba1\u7b97\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u533a\u5206\u64cd\u4f5c\u5bf9\u8c61&#xff1a;\n<ul>\n<li>\u64cd\u4f5c\u6587\u4ef6\u65f6&#xff0c;\u8bfb&#xff08;cat&#xff09;\u9700\u8981\u6587\u4ef6\u7684 r&#xff0c;\u6539\u5199&#xff08;vim&#xff09;\u9700\u8981\u6587\u4ef6\u7684 w&#xff0c;\u8fd0\u884c\u9700\u8981\u6587\u4ef6\u7684 x&#xff1b;<\/li>\n<li>\u589e\u5220\u6587\u4ef6\u3001\u91cd\u547d\u540d\u6216\u79fb\u52a8\u6587\u4ef6\u65f6&#xff0c;\u9996\u8981\u68c0\u67e5\u7684\u662f\u5176\u6240\u5728\u7236\u76ee\u5f55\u7684 w \u548c x \u6743\u9650&#xff0c;\u800c\u975e\u6587\u4ef6\u81ea\u8eab\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u628a\u5173\u65b0\u5efa\u4e0e\u5171\u4eab&#xff1a;\n<ul>\n<li>\u68c0\u67e5\u9ed8\u8ba4\u6743\u9650\u662f\u5426\u7b26\u5408\u9884\u671f&#xff0c;\u901a\u8fc7 umask \u8c03\u6574\u63a9\u7801&#xff1b;<\/li>\n<li>\u9047\u5230\u516c\u5171\u5171\u4eab\u76ee\u5f55&#xff0c;\u53ca\u65f6\u914d\u7f6e\u7c98\u6ede\u4f4d&#xff08;chmod &#043;t&#xff09;&#xff0c;\u907f\u514d\u591a\u4eba\u534f\u4f5c\u4e0b\u7684\u8bef\u5220\u98ce\u9669\u3002<\/li>\n<\/ul>\n<\/li>\n","protected":false},"excerpt":{"rendered":"<p>\/* MD \/ \u5bcc\u6587\u672c\u4e2d\u7684 .toc\uff08\u542b\u535a\u5ba2\u56ed\u642c\u5bb6\u7b49\u5d4c\u5957\u7ed3\u6784\uff09\uff1b.toc-box \u5728\u4fa7\u680f\uff0c\u4e0d\u53d7\u5f71\u54cd *\/#content_views .toc,\/* \u7f16\u8f91\u5668\u5e38\u5728\u76ee\u5f55\u524d\u540e\u63d2\u5165\u7a7a p\uff08:empty \u4ecd\u5360 20px\uff09\uff0c\u4e00\u5e76\u53bb\u6389\u907f\u514d\u9876\u7a7a\u9699 *\/#content_views.markdown_views &gt; p:empty:has(+ .toc),#content_views.markdown_views &gt; .toc + p:empty,\/* \u5bcc\u6587\u672c\u65e7\u7248\u76ee\u5f55\u6807\u8bb0 *\/#content<\/p>\n","protected":false},"author":2,"featured_media":123945,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[11820,58,43],"topic":[],"class_list":["post-123965","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-atomgit","tag-linux","tag-43"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u3010Linux \u4fee\u70bc\u5f55\u3011\u544a\u522b Permission denied\uff1a\u4e00\u6587\u8bb2\u900f Linux \u6743\u9650\u4f53\u7cfb\u4e0e\u5e95\u5c42\u903b\u8f91 - \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\/123965.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u3010Linux \u4fee\u70bc\u5f55\u3011\u544a\u522b Permission denied\uff1a\u4e00\u6587\u8bb2\u900f Linux \u6743\u9650\u4f53\u7cfb\u4e0e\u5e95\u5c42\u903b\u8f91 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\/* MD \/ \u5bcc\u6587\u672c\u4e2d\u7684 .toc\uff08\u542b\u535a\u5ba2\u56ed\u642c\u5bb6\u7b49\u5d4c\u5957\u7ed3\u6784\uff09\uff1b.toc-box \u5728\u4fa7\u680f\uff0c\u4e0d\u53d7\u5f71\u54cd *\/#content_views .toc,\/* \u7f16\u8f91\u5668\u5e38\u5728\u76ee\u5f55\u524d\u540e\u63d2\u5165\u7a7a p\uff08:empty \u4ecd\u5360 20px\uff09\uff0c\u4e00\u5e76\u53bb\u6389\u907f\u514d\u9876\u7a7a\u9699 *\/#content_views.markdown_views &gt; p:empty:has(+ .toc),#content_views.markdown_views &gt; .toc + p:empty,\/* \u5bcc\u6587\u672c\u65e7\u7248\u76ee\u5f55\u6807\u8bb0 *\/#content\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/123965.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-11-08T07:01:17+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261108070112-6af01e38e5d02.jpg\" \/>\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=\"8 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/123965.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/123965.html\",\"name\":\"\u3010Linux \u4fee\u70bc\u5f55\u3011\u544a\u522b Permission denied\uff1a\u4e00\u6587\u8bb2\u900f Linux \u6743\u9650\u4f53\u7cfb\u4e0e\u5e95\u5c42\u903b\u8f91 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-11-08T07:01:17+00:00\",\"dateModified\":\"2026-11-08T07:01:17+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/123965.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/123965.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/123965.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u3010Linux \u4fee\u70bc\u5f55\u3011\u544a\u522b Permission denied\uff1a\u4e00\u6587\u8bb2\u900f Linux \u6743\u9650\u4f53\u7cfb\u4e0e\u5e95\u5c42\u903b\u8f91\"}]},{\"@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":"\u3010Linux \u4fee\u70bc\u5f55\u3011\u544a\u522b Permission denied\uff1a\u4e00\u6587\u8bb2\u900f Linux \u6743\u9650\u4f53\u7cfb\u4e0e\u5e95\u5c42\u903b\u8f91 - \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\/123965.html","og_locale":"zh_CN","og_type":"article","og_title":"\u3010Linux \u4fee\u70bc\u5f55\u3011\u544a\u522b Permission denied\uff1a\u4e00\u6587\u8bb2\u900f Linux \u6743\u9650\u4f53\u7cfb\u4e0e\u5e95\u5c42\u903b\u8f91 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\/* MD \/ \u5bcc\u6587\u672c\u4e2d\u7684 .toc\uff08\u542b\u535a\u5ba2\u56ed\u642c\u5bb6\u7b49\u5d4c\u5957\u7ed3\u6784\uff09\uff1b.toc-box \u5728\u4fa7\u680f\uff0c\u4e0d\u53d7\u5f71\u54cd *\/#content_views .toc,\/* \u7f16\u8f91\u5668\u5e38\u5728\u76ee\u5f55\u524d\u540e\u63d2\u5165\u7a7a p\uff08:empty \u4ecd\u5360 20px\uff09\uff0c\u4e00\u5e76\u53bb\u6389\u907f\u514d\u9876\u7a7a\u9699 *\/#content_views.markdown_views &gt; p:empty:has(+ .toc),#content_views.markdown_views &gt; .toc + p:empty,\/* \u5bcc\u6587\u672c\u65e7\u7248\u76ee\u5f55\u6807\u8bb0 *\/#content","og_url":"https:\/\/www.wsisp.com\/helps\/123965.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-11-08T07:01:17+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261108070112-6af01e38e5d02.jpg"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"8 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/123965.html","url":"https:\/\/www.wsisp.com\/helps\/123965.html","name":"\u3010Linux \u4fee\u70bc\u5f55\u3011\u544a\u522b Permission denied\uff1a\u4e00\u6587\u8bb2\u900f Linux \u6743\u9650\u4f53\u7cfb\u4e0e\u5e95\u5c42\u903b\u8f91 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-11-08T07:01:17+00:00","dateModified":"2026-11-08T07:01:17+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/123965.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/123965.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/123965.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u3010Linux \u4fee\u70bc\u5f55\u3011\u544a\u522b Permission denied\uff1a\u4e00\u6587\u8bb2\u900f Linux \u6743\u9650\u4f53\u7cfb\u4e0e\u5e95\u5c42\u903b\u8f91"}]},{"@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\/123965","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=123965"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/123965\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/123945"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=123965"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=123965"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=123965"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=123965"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}