{"id":3457,"date":"2020-10-15T13:20:53","date_gmt":"2020-10-15T13:20:53","guid":{"rendered":"https:\/\/raspberry-projects.com\/pi\/?p=3457"},"modified":"2020-10-15T13:22:34","modified_gmt":"2020-10-15T13:22:34","slug":"chmod","status":"publish","type":"post","link":"https:\/\/raspberry-projects.com\/pi\/command-line\/permissions\/chmod","title":{"rendered":"chmod"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">Get permissions state of file or folder<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>ls \u2013l myfile_name<\/code><\/pre>\n\n\n\n<p>The 3 values are shown in this order: Owner, group and others<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Altering permissions<\/h4>\n\n\n\n<h5 class=\"wp-block-heading\">Set all permissions<\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo chmod 644 myfile_name<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">Add an individual permission<\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo chmod +rw myfile_name\nsudo chmod g+rw myfile_name\nsudo chmod o+rw myfile_name<\/code><\/pre>\n\n\n\n<p>(Example adds read and write permission for owner, group or others)<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">Remove an individual permission<\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo chmod -w myfile_name\nsudo chmod g-w myfile_name\nsudo chmod o-w myfile_name<\/code><\/pre>\n\n\n\n<p>(Example removes write permission for owner, group or others)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Get permissions state of file or folder The 3 values are shown in this order: Owner, group and others Altering permissions Set all permissions Add an individual permission (Example adds read and write permission for owner, group or others) Remove an individual permission (Example removes write permission for owner, group or others)<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[171],"tags":[],"class_list":["post-3457","post","type-post","status-publish","format-standard","hentry","category-permissions"],"_links":{"self":[{"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/posts\/3457","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/comments?post=3457"}],"version-history":[{"count":3,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/posts\/3457\/revisions"}],"predecessor-version":[{"id":3460,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/posts\/3457\/revisions\/3460"}],"wp:attachment":[{"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/media?parent=3457"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/categories?post=3457"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/tags?post=3457"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}