{"id":505,"date":"2015-09-19T09:24:38","date_gmt":"2015-09-19T09:24:38","guid":{"rendered":"https:\/\/ahorseforonebin.co.uk\/?p=505"},"modified":"2015-09-19T09:27:23","modified_gmt":"2015-09-19T09:27:23","slug":"cursing-recursive-permissions-recursively","status":"publish","type":"post","link":"https:\/\/ahorseforonebin.co.uk\/?p=505","title":{"rendered":"Cursing recursive permissions recursively"},"content":{"rendered":"<p>During a phase of system testing on server c1, in the new datacentre, an interesting problem was discovered.<\/p>\n<p>Using WordPress as the template (so the results could be applied to Drupal installations &#8211; and any other of those .php-related content management systems), we discovered that permissions on high-level directories were not being replicated down to low-level directories.<\/p>\n<p>This meant a loss of function (where that function relied on scripts that are installed in those low-level directories by the vanilla application).<\/p>\n<p>In WordPress and Drupal, for example, uploading media of any type wouldn&#8217;t work.<\/p>\n<p>This is a significant barrier for a content management system.<\/p>\n<p>The first workaround seemed to solve the problem, except that the uploaded files were owned by Apache (the webserver in the LAMP stack).<\/p>\n<p>Unfortunately this took us to another permissions-based problem which stopped the owner (system user) modifying those files &#8211; even through ftp.<\/p>\n<p>If you think about it for a minute, it&#8217;s an interesting problem &#8211; where a vanilla software installation granted the higher-level directories one set of permissions, while the lower-level directories were granted different (and functionality-limiting) permissions.<\/p>\n<p>Anyway.<\/p>\n<p>The first attempt to fix the problem was to deploy <a href=\"https:\/\/en.wikipedia.org\/wiki\/SuEXEC\" target=\"_blank\">suEXEC<\/a> on the server (VM). Unfortunately suEXEC didn&#8217;t get us all the way out of the problem, so we needed to look for another solution.<\/p>\n<p>The second attempt to make the problem go away was to use <a href=\"http:\/\/www.fastcgi.com\/drupal\/\" target=\"_blank\">fastCGI<\/a>.<\/p>\n<p>Yesterday afternoon Manuel, our brilliant technical resource, deployed fastCGI on the VM we have been using as a test.<\/p>\n<p>I used the standard WordPress admin control panel to upload an image in to a test post and successfully published that.<\/p>\n<p>Then created another test post, uploaded the image in to that and successfully published it.<\/p>\n<p>Then I went back to both published posts and using the standard WordPress screen, I modified the second image and republished the post.<\/p>\n<p>All of these tests worked.<\/p>\n<p>Manuel&#8217;s next job is to add the deployment of fastCGI in to the VM creation template.<\/p>\n<p>This will enable the datacentre to deploy a fully-functional LAMP-stack VM for a customer within a matter of seconds.<\/p>\n<p>Well done Manuel!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>During a phase of system testing on server c1, in the new datacentre, an interesting problem was discovered. Using WordPress as the template (so the results could be applied to Drupal installations &#8211; and any other of those .php-related content management systems), we discovered that permissions on high-level directories were \u2026 <a class=\"continue-reading-link\" href=\"https:\/\/ahorseforonebin.co.uk\/?p=505\"> Continue reading <span class=\"meta-nav\">&rarr; <\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-505","post","type-post","status-publish","format-standard","hentry","category-admin"],"_links":{"self":[{"href":"https:\/\/ahorseforonebin.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/505","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ahorseforonebin.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ahorseforonebin.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ahorseforonebin.co.uk\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ahorseforonebin.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=505"}],"version-history":[{"count":3,"href":"https:\/\/ahorseforonebin.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/505\/revisions"}],"predecessor-version":[{"id":508,"href":"https:\/\/ahorseforonebin.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/505\/revisions\/508"}],"wp:attachment":[{"href":"https:\/\/ahorseforonebin.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=505"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ahorseforonebin.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=505"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ahorseforonebin.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=505"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}