{"id":16155,"date":"2024-02-18T20:29:17","date_gmt":"2024-02-18T12:29:17","guid":{"rendered":"https:\/\/blog.ywdevops.cn\/?p=16155"},"modified":"2024-02-18T22:40:37","modified_gmt":"2024-02-18T14:40:37","slug":"stiky","status":"publish","type":"post","link":"https:\/\/blog.ywdevops.cn\/index.php\/2024\/02\/18\/stiky\/","title":{"rendered":"linux\u7279\u6b8a\u6743\u9650stiky\u8be6\u89e3"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u5728Linux\u4e2d\u6709\u51e0\u4e2a\u7279\u6b8a\u7684\u6743\u9650\uff0c\u5206\u522b\u4e3asuid\u3001sgid\u3001stiky\uff0csuid\u548csgid\u53ef\u53c2\u8003\u6587\u7ae0<a rel=\"noreferrer noopener\" href=\"https:\/\/blog.ywdevops.cn\/index.php\/2021\/06\/12\/linux-6\/\" target=\"_blank\">suid\u548csgid<\/a>\uff0c\u63a5\u4e0b\u6765\u8bb2\u89e3\u4e0b\u4ec0\u4e48\u662fstiky<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728linux\u4e2dstiky\u4e5f\u53eb\u505a\u7c98\u6ede\u4f4d\uff0c\u4e00\u822c\u4f5c\u7528\u4e8e\u76ee\u5f55\u4e0a\uff0c\u8bbe\u7f6e\u540e\u7684\u76ee\u5f55\u4e2d\uff0c\u53ea\u6709\u6587\u4ef6\u7684\u6240\u6709\u8005\u53ef\u4ee5\u5bf9\u6587\u4ef6\u8fdb\u884c\u5220\u9664\uff0c\u5176\u4f59\u7528\u6237\u53ea\u80fd\u67e5\u770b\uff0c\u4e0d\u53ef\u5220\u9664\uff0cstiky\u6743\u9650\u662f\u901a\u8fc7other\u6765\u8bbe\u7f6e\u7684\uff0c\u8bed\u6cd5\u5982\u4e0b\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>chmod o+t   \/test                     #\u7ed9test\u76ee\u5f55\u8bbe\u7f6estiky\u6743\u9650<\/li>\n\n\n\n<li>chmod o-t   \/test                      #\u7ed9test\u76ee\u5f55\u53d6\u6d88stiky\u6743\u9650<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u6b64\u6743\u9650\u4e00\u822c\u53ef\u7528\u6765\u7ed9\u5171\u4eab\u76ee\u5f55\u8bbe\u7f6e\uff0c\u591a\u4e2a\u7528\u6237\u4f7f\u7528\u6b64\u76ee\u5f55\uff0c\u4f46\u662f\u53ea\u6709\u81ea\u5df1\u80fd\u5220\u9664\u81ea\u5df1\u521b\u5efa\u7684\u6587\u4ef6<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6f14\u793a\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">1\u3001\u9996\u5148\u6211\u4eec\u5728\u6839\u76ee\u5f55\u4e0b\u521b\u5efa\u4e00\u4e2atest\u76ee\u5f55\uff0c\u7136\u540e\u7ed9\u6743\u9650\u4e3a777\uff0c\u5982\u56fe:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir \/test &amp;&amp; chmod 777 \/test<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">2\u3001\u5207\u6362\u5230\u666e\u901a\u7528\u6237gongguan\uff0c\u5728test\u76ee\u5f55\u4e2d\u521b\u5efa\u6587\u4ef6hello.txt\uff0c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"693\" height=\"137\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2024\/02\/2.jpg\" alt=\"\" class=\"wp-image-16160\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2024\/02\/2.jpg 693w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2024\/02\/2-300x59.jpg 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2024\/02\/2-600x119.jpg 600w\" sizes=\"auto, (max-width: 693px) 100vw, 693px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">3\u3001\u5207\u6362\u5230yi\u7528\u6237\uff0c\u8fdb\u5165test\u76ee\u5f55\u4e2d\uff0c\u770b\u662f\u5426\u53ef\u4ee5\u5220\u9664hello.txt\uff0c\u5982\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"694\" height=\"176\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2024\/02\/3.jpg\" alt=\"\" class=\"wp-image-16162\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2024\/02\/3.jpg 694w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2024\/02\/3-300x76.jpg 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2024\/02\/3-600x152.jpg 600w\" sizes=\"auto, (max-width: 694px) 100vw, 694px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ece\u4e0a\u56fe\u770b\u51fa\uff0c\u5728test\u76ee\u5f55\u4e0b\uff0c\u7528\u6237yi\u53ef\u4ee5\u5220\u9664\u7528\u6237gongguan\u7684\u6587\u4ef6\uff0c\u8fd9\u6837\u592a\u4e0d\u5b89\u5168\u4e86<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">4\u3001\u63a5\u4e0b\u6765\u5728root\u7528\u6237\u4e0b\uff0c\u7ed9\/test\u76ee\u5f55\u8bbe\u7f6estiky\u6743\u9650\uff0c\u6267\u884c\u5982\u4e0b\u547d\u4ee4\uff0c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>chmod o+t \/test<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u67e5\u770b\u76ee\u5f55test\uff0c\u53ef\u4ee5\u770b\u5230other\u4f4d\u7f6e\u4e0a\u591a\u4e86\u4e00\u4e2at\uff0c\u5982\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"691\" height=\"76\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2024\/02\/4.jpg\" alt=\"\" class=\"wp-image-16163\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2024\/02\/4.jpg 691w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2024\/02\/4-300x33.jpg 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2024\/02\/4-600x66.jpg 600w\" sizes=\"auto, (max-width: 691px) 100vw, 691px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">5\u3001\u91cd\u590d\u524d\u51e0\u6b65\u9aa4\uff0c\u7136\u540e\u5728\u5207\u6362\u5230\u7528\u6237yi\u6765\u5220\u9664hello.txt\uff0c\u53ef\u4ee5\u770b\u5230\u6743\u9650\u4e0d\u8db3\uff0c\u5982\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"697\" height=\"85\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2024\/02\/5.jpg\" alt=\"\" class=\"wp-image-16164\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2024\/02\/5.jpg 697w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2024\/02\/5-300x37.jpg 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2024\/02\/5-600x73.jpg 600w\" sizes=\"auto, (max-width: 697px) 100vw, 697px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u6ce8\uff1a\u867d\u7136\u4e0d\u80fd\u5220\u9664\uff0c\u4f46\u662f\u590d\u5236\u3001\u67e5\u770b\u662f\u53ef\u4ee5\u5f97<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5907\u6ce8\uff1alinux\u4e2d\u7684\/tmp\u76ee\u5f55\u9ed8\u8ba4\u5c31\u662f\u8bbe\u7f6estiky\u6743\u9650\u7684\uff0c\u5982\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"693\" height=\"99\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2024\/02\/6.jpg\" alt=\"\" class=\"wp-image-16166\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2024\/02\/6.jpg 693w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2024\/02\/6-300x43.jpg 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2024\/02\/6-600x86.jpg 600w\" sizes=\"auto, (max-width: 693px) 100vw, 693px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>\u5728Linux\u4e2d\u6709\u51e0\u4e2a\u7279\u6b8a\u7684\u6743\u9650\uff0c\u5206\u522b\u4e3asuid\u3001sgid\u3001stiky\uff0csuid\u548csgid\u53ef\u53c2\u8003\u6587\u7ae0suid\u548cs [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":16157,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34,22],"tags":[],"class_list":["post-16155","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","category-server"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":8}},"_links":{"self":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts\/16155","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/comments?post=16155"}],"version-history":[{"count":6,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts\/16155\/revisions"}],"predecessor-version":[{"id":16167,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts\/16155\/revisions\/16167"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/media\/16157"}],"wp:attachment":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/media?parent=16155"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/categories?post=16155"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/tags?post=16155"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}