{"id":10849,"date":"2020-06-01T14:59:27","date_gmt":"2020-06-01T05:59:27","guid":{"rendered":"http:\/\/www.code-magagine.com\/?p=10849"},"modified":"2023-05-27T21:21:11","modified_gmt":"2023-05-27T12:21:11","slug":"%e3%80%90linux%e3%80%91%e3%80%8c%e3%83%91%e3%83%bc%e3%83%9f%e3%83%83%e3%82%b7%e3%83%a7%e3%83%b3%e3%80%8d%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6","status":"publish","type":"post","link":"http:\/\/www.code-magagine.com\/?p=10849","title":{"rendered":"\u3010Linux\u3011\u300c\u30aa\u30fc\u30ca\u30fc\u3001\u30b0\u30eb\u30fc\u30d7\u300d\u300c\u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3\u300d\u306b\u3064\u3044\u3066"},"content":{"rendered":"<h2>\u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3\u3068\u306f\uff1f<\/h2>\n<p>\u30d5\u30a1\u30a4\u30eb\u3084\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u5bfe\u3059\u308b\u6a29\u9650\u306e\u3053\u3068\u3067\u3059\u3002<\/p>\n<h2>\u306a\u305c\u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3\u304c\u5fc5\u8981\u306a\u306e\u304b\uff1f<\/h2>\n<p>Linux\u306f<span style=\"color: #ff0000;\"><strong>\u8907\u6570\u30e6\u30fc\u30b6\u30fc\u304c\u30ed\u30b0\u30a4\u30f3\u3057\u3066\u4f7f\u3046\u3053\u3068\u304c\u524d\u63d0<\/strong><\/span>\u306b\u306a\u3063\u3066\u3044\u308b\u306e\u3067\u5b89\u6613\u306b\u30d5\u30a1\u30a4\u30eb\u5185\u5bb9\u3092\u898b\u3089\u308c\u305f\u308a\u7de8\u96c6\u3057\u305f\u308a\u3067\u304d\u306a\u3044\u3088\u3046\u6a29\u9650\u3092\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2>\u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3\u306e\u8981\u7d20<\/h2>\n<p>Linux\u306b\u306f\u5168\u3066\u306e\u30d5\u30a1\u30a4\u30eb\u304c\u4e0b\u8a18\u306e\u8981\u7d20\u3092\u4fdd\u6301\u3057\u3066\u3044\u307e\u3059\u3002<span style=\"color: #ff0000;\"><strong>\u300cls -l\u300d\u30b3\u30de\u30f3\u30c9\u3067\u30d5\u30a1\u30a4\u30eb\u8a73\u7d30\u3092\u51fa\u529b\u3059\u308c\u3070\u5168\u9805\u76ee\u78ba\u8a8d\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd<\/strong><\/span>\u3067\u3059\u3002<\/p>\n<ul>\n<li>\u30d5\u30a1\u30a4\u30eb\u306e\u30aa\u30fc\u30ca\u30fc<\/li>\n<li>\u30d5\u30a1\u30a4\u30eb\u306e\u30b0\u30eb\u30fc\u30d7<\/li>\n<li>\u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3<\/li>\n<\/ul>\n<h3>\u30d5\u30a1\u30a4\u30eb\u30aa\u30fc\u30ca\u30fc\uff08\u6240\u6709\u8005\uff09<\/h3>\n<p>\u30d5\u30a1\u30a4\u30eb\u306e\u6240\u6709\u8005<\/p>\n<h4>\u30d5\u30a1\u30a4\u30eb\u30aa\u30fc\u30ca\u30fc\u306e\u8a2d\u5b9a\u65b9\u6cd5<\/h4>\n<ul>\n<li>\u65b0\u898f\u3067\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u305f\u5834\u5408\u306f\u3001<span style=\"color: #ff0000;\"><strong>\u30d5\u30a1\u30a4\u30eb\u306e\u4f5c\u6210\u8005\u304c\u81ea\u52d5\u7684\u306b\u305d\u306e\u30d5\u30a1\u30a4\u30eb\u306e\u6240\u6709\u8005<\/strong><\/span>\u306b\u306a\u308a\u307e\u3059\u3002<\/li>\n<li><span style=\"color: #ff0000;\"><strong>chown\u30b3\u30de\u30f3\u30c9<\/strong><\/span>\u3067\u8a2d\u5b9a\u3059\u308b\u3002<\/li>\n<\/ul>\n<h5>chown\u3067\u306e\u8a2d\u5b9a\u4f8b<\/h5>\n<pre class=\"lang:default decode:true\">chown root aaa.txt<\/pre>\n<h3>\u30d5\u30a1\u30a4\u30eb\u306e\u30b0\u30eb\u30fc\u30d7<\/h3>\n<p>\u30d5\u30a1\u30a4\u30eb\u306e\u6240\u6709\u30b0\u30eb\u30fc\u30d7\u3001\u30e6\u30fc\u30b6\u30fc\u3092\u7279\u5b9a\u30b0\u30eb\u30fc\u30d7\u306b\u6240\u5c5e\u3055\u305b\u30b0\u30eb\u30fc\u30d7\u306b\u6a29\u9650\u3092\u4e0e\u3048\u308b\u3053\u3068\u3067<span style=\"color: #ff0000;\"><strong>\u8907\u6570\u30e6\u30fc\u30b6\u30fc\u306e\u6a29\u9650\u3092\u4e00\u62ec\u7ba1\u7406\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd<\/strong><\/span>\u3067\u3059\u3002\u3053\u308c\u3082chown\u3067\u30e6\u30fc\u30b6\u30fc\u540d\u3068\u30b0\u30eb\u30fc\u30d7\u307e\u3068\u3081\u3066\u5909\u66f4\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<h4>chown\u3067\u306e\u8a2d\u5b9a\u4f8b<\/h4>\n<pre class=\"lang:default decode:true\">chown root:root aaa.txt<\/pre>\n<p>\u4e0a\u8a18\u4f8b\u3067\u306f\u3001aaa.txt\u306e\u30b0\u30eb\u30fc\u30d7\u3092root\u3001\u30d5\u30a1\u30a4\u30eb\u30aa\u30fc\u30ca\u30fc\u3092root\u306b\u5909\u66f4\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2>\u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3<\/h2>\n<table>\n<thead>\n<tr>\n<th>\u30e2\u30fc\u30c9<\/th>\n<th>\u30e2\u30fc\u30c9<\/th>\n<th>\u6a29\u9650<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>4<\/td>\n<td>r<\/td>\n<td>\u30d5\u30a1\u30a4\u30eb\u306e\u8aad\u307f\u53d6\u308a<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>w<\/td>\n<td>\u30d5\u30a1\u30a4\u30eb\u306e\u66f8\u304d\u8fbc\u307f<\/td>\n<\/tr>\n<tr>\n<td>1<\/td>\n<td>x<\/td>\n<td>\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u5b9f\u884c<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u30d5\u30a1\u30a4\u30eb\u306b\u5bfe\u3059\u308b\u7de8\u96c6\u6a29\u9650\u306e\u3053\u3068\u3067\u3059\u3002chmod\u30b3\u30de\u30f3\u30c9\u3067\u5909\u66f4\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">chmod 664 aaa.txt<\/pre>\n<p>[\u6240\u6709\u8005][\u30b0\u30eb\u30fc\u30d7][\u305d\u306e\u4ed6]\u306e\u9806\u306b\u6307\u5b9a\u3057\u307e\u3059\u3002\u6240\u6709\u8005\u306b6(\u8aad\u307f\u53d6\u308a\u3068\u66f8\u304d\u8fbc\u307f)\u3001\u6240\u6709\u30b0\u30eb\u30fc\u30d7\u306b6(\u8aad\u307f\u53d6\u308a\u3068\u66f8\u304d\u8fbc\u307f)\u3001\u305d\u306e\u4ed6\u306b4(\u8aad\u307f\u53d6\u308a)\u3092\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3064\u307e\u308a\u3001\u4e0a\u8a18\u4f8b\u3067\u306f\u6240\u6709\u8005\u3084\u6240\u6709\u30b0\u30eb\u30fc\u30d7\u4ee5\u5916\u306e\u4eba\u306f\u66f8\u304d\u8fbc\u307e\u305b\u306a\u3044\u3068\u3044\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>chmod\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30a2\u30eb\u30d5\u30a1\u30d9\u30c3\u30c8\u3092\u4f7f\u3063\u3066\u6587\u5b57\u3067\u6307\u5b9a\u3059\u308b\u3053\u3068\u3082\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<table>\n<tbody>\n<tr>\n<td>u<\/td>\n<td>\u6240\u6709\u8005\u306e\u6a29\u9650\u3092\u6307\u5b9a<\/td>\n<\/tr>\n<tr>\n<td>g<\/td>\n<td>\u30b0\u30eb\u30fc\u30d7\u306e\u6a29\u9650\u3092\u6307\u5b9a<\/td>\n<\/tr>\n<tr>\n<td>o<\/td>\n<td>\u305d\u306e\u4ed6\u306e\u30e6\u30fc\u30b6\u6a29\u9650\u3092\u6307\u5b9a<\/td>\n<\/tr>\n<tr>\n<td>a<\/td>\n<td>\u5168\u3066\u306e\u30e6\u30fc\u30b6\u6a29\u9650\u3092\u6307\u5b9a<\/td>\n<\/tr>\n<tr>\n<td>+<\/td>\n<td>\u6a29\u9650\u306e\u4ed8\u4e0e<\/td>\n<\/tr>\n<tr>\n<td>-<\/td>\n<td>\u6a29\u9650\u306e\u5265\u596a<\/td>\n<\/tr>\n<tr>\n<td>=<\/td>\n<td>\u6a29\u9650\u306e\u76f4\u63a5\u306a\u6307\u5b9a<\/td>\n<\/tr>\n<tr>\n<td>r<\/td>\n<td>\u8aad\u307f\u8fbc\u307f<\/td>\n<\/tr>\n<tr>\n<td>w<\/td>\n<td>\u66f8\u304d\u8fbc\u307f<\/td>\n<\/tr>\n<tr>\n<td>x<\/td>\n<td>\u5b9f\u884c<\/td>\n<\/tr>\n<tr>\n<td>\u00a0s<\/td>\n<td>SGID\/SUID<\/td>\n<\/tr>\n<tr>\n<td>\u00a0t<\/td>\n<td>\u30b9\u30c6\u30a3\u30c3\u30ad\u30fc\u30d3\u30c3\u30c8<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<pre class=\"lang:default decode:true \">chmod u=rw,g=rw,o=r aaa.txt<\/pre>\n<p>664\u3067\u3042\u308c\u3070\u4e0a\u8a18\u306e\u3088\u3046\u306a\u6307\u5b9a\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h3>umask<\/h3>\n<p>\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3\u8a2d\u5b9a\u306b\u306a\u308a\u307e\u3059\u3002(\u300c\/etc\/profile\u300d\u306a\u3069\u3067\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308bOS\u3082\u591a\u3044\u3067\u3059\u3002\uff09<\/p>\n","protected":false},"excerpt":{"rendered":"\u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3\u3068\u306f\uff1f \u30d5\u30a1\u30a4\u30eb\u3084\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u5bfe\u3059\u308b\u6a29\u9650\u306e\u3053\u3068\u3067\u3059\u3002 \u306a\u305c\u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3\u304c\u5fc5\u8981\u306a\u306e\u304b\uff1f Linux\u306f\u8907\u6570\u30e6\u30fc\u30b6\u30fc\u304c\u30ed\u30b0\u30a4\u30f3\u3057\u3066\u4f7f\u3046\u3053\u3068\u304c\u524d\u63d0\u306b\u306a\u3063\u3066\u3044\u308b\u306e\u3067\u5b89\u6613\u306b\u30d5\u30a1\u30a4\u30eb\u5185\u5bb9\u3092\u898b\u3089\u308c\u305f\u308a\u7de8\u96c6\u3057\u305f\u308a\u3067\u304d\u306a\u3044 [&hellip;]","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[39],"tags":[],"_links":{"self":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/10849"}],"collection":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10849"}],"version-history":[{"count":8,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/10849\/revisions"}],"predecessor-version":[{"id":20340,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/10849\/revisions\/20340"}],"wp:attachment":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10849"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10849"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10849"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}