{"id":6600,"date":"2014-04-20T13:44:05","date_gmt":"2014-04-20T13:44:05","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/04\/20\/chmod-symbolic-notation-unexpected-operation-behavior-collection-of-common-programming-errors\/"},"modified":"2014-04-20T13:44:05","modified_gmt":"2014-04-20T13:44:05","slug":"chmod-symbolic-notation-unexpected-operation-behavior-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/04\/20\/chmod-symbolic-notation-unexpected-operation-behavior-collection-of-common-programming-errors\/","title":{"rendered":"chmod symbolic notation: unexpected &ldquo;=&rdquo; operation behavior-Collection of common programming errors"},"content":{"rendered":"<p>To build upon and\/or clarify Davidw&#8217;s answer:\u00a0 Since you&#8217;re saying <code>g=<\/code>, you are asking for only the group permissions to be changed.\u00a0 If you would say <code>chmod =x foo<\/code>, you would get <code>---x--x--x<\/code>.\u00a0 If you want to\u00a0get <code>------x---<\/code>, do<\/p>\n<pre><code>chmod =,g=x foo\n<\/code><\/pre>\n<p>This is the same as<\/p>\n<pre><code>chmod  =  foo\nchmod g=x foo\n<\/code><\/pre>\n<p>The first command sets the permissions to 0 (<code>----------<\/code>), because it sets all three user groups (<code>u<\/code>, <code>g<\/code>, and <code>o<\/code>) to <strong>no access<\/strong>, and I guess by now you understand what the second one does.\u00a0 As indicated, you can concatenate operations by separating them with commas.<\/p>\n<blockquote>\n<p>I understand that to have execution permission you have to have read permission, so the read permission for the group is needed, .<\/p>\n<\/blockquote>\n<p>This is true only if you&#8217;re talking about a script.\u00a0 A (compiled) binary executable can be run with only execute permission.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To build upon and\/or clarify Davidw&#8217;s answer:\u00a0 Since you&#8217;re saying g=, you are asking for only the group permissions to be changed.\u00a0 If you would say chmod =x foo, you would get &#8212;x&#8211;x&#8211;x.\u00a0 If you want to\u00a0get &#8212;&#8212;x&#8212;, do chmod =,g=x foo This is the same as chmod = foo chmod g=x foo The first [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-6600","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/6600","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=6600"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/6600\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=6600"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=6600"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=6600"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}