{"id":1651,"date":"2013-04-23T13:24:18","date_gmt":"2013-04-23T20:24:18","guid":{"rendered":"http:\/\/www.wellgolly.com\/?p=1651"},"modified":"2013-04-23T13:24:18","modified_gmt":"2013-04-23T20:24:18","slug":"things-i-cant-remember-permissions","status":"publish","type":"post","link":"https:\/\/www.wellgolly.com\/?p=1651","title":{"rendered":"Things I can\u2019t remember &#8211; Permissions"},"content":{"rendered":"<p>We recently migrated our sites to Linode. Since we switched distros from Gentoo to Ubuntu we had to add the users in by hand. That meant that the permissions on the old system didn\u2019t match the permissions on the new system. In most cases, I want the person who owns the site to be the owner of the files and the group for the site be able to read and write the files. I usually put myself, artists, and system maintainers into the group. Everyone else, including Apache, gets read access. To do this manually is a real pain. Fortunately, there is an easy way.<\/p>\n<p>To change the permissions on the directories go to the site you want to change and use:<br \/>\n<pre><code class=\"\u2019smaller\u2019 preserve-code-formatting\">\nsudo find . -type d -exec chmod 775 {} \\;\n<\/code><\/pre><\/p>\n<p>To change the permissions on the files go to the site you want to change and use:<br \/>\n<pre><code class=\"\u2019smaller\u2019 preserve-code-formatting\">\nsudo find . -type f -exec chmod 664 {} \\;\n<\/code><\/pre><\/p>\n<p>You need sudo since you probably aren\u2019t the owner of the files. That\u2019s it. The commands work recursively from wherever they are started.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We recently migrated our sites to Linode. Since we switched distros from Gentoo to Ubuntu we had to add the users in by hand. That meant that the permissions on the old system didn\u2019t match the permissions on the new system. In most cases, I want the person who owns the site to be the &hellip; <a href=\"https:\/\/www.wellgolly.com\/?p=1651\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Things I can\u2019t remember &#8211; Permissions<\/span><\/a><\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-1651","post","type-post","status-publish","format-standard","hentry","category-computers"],"_links":{"self":[{"href":"https:\/\/www.wellgolly.com\/index.php?rest_route=\/wp\/v2\/posts\/1651","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wellgolly.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wellgolly.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wellgolly.com\/index.php?rest_route=\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wellgolly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1651"}],"version-history":[{"count":0,"href":"https:\/\/www.wellgolly.com\/index.php?rest_route=\/wp\/v2\/posts\/1651\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wellgolly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1651"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wellgolly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1651"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wellgolly.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1651"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}