{"id":781,"date":"2016-09-16T10:47:51","date_gmt":"2016-09-16T09:47:51","guid":{"rendered":"http:\/\/www.haxed.me.uk\/?p=781"},"modified":"2016-09-20T12:17:19","modified_gmt":"2016-09-20T11:17:19","slug":"securing-wordpress-chmod-644-chmod-755-easy-pro-way","status":"publish","type":"post","link":"https:\/\/haxed.me.uk\/index.php\/2016\/09\/16\/securing-wordpress-chmod-644-chmod-755-easy-pro-way\/","title":{"rendered":"Securing your WordPress with chmod 644 and chmod 755 the easy (but pro) way"},"content":{"rendered":"<p>Let&#8217;s say we have a document root like:<\/p>\n<p>It&#8217;s interesting to note the instructions for this will vary from environment to environment, it depends on which user is looking after apache2, etc.<\/p>\n<pre>\r\n\/var\/www\/mysite.com\/htdocs\r\n<\/pre>\n<p><strong> Make all files read\/write and owned by www-data apache2 user only <\/strong><\/p>\n<pre>\r\nroot@meine:\/var\/www\/mysite.com\/htdocs# find . -type f -exec chown apache2:apache2 {} \\; \r\nroot@meine:\/var\/www\/mysite.com\/htdocs# find . -type f -exec chmod 644 {} \\;\r\n<\/pre>\n<p><strong> Make all folders accessible Read + Execute, but no write permissions <\/strong><\/p>\n<pre>\r\nroot@meine:\/var\/www\/mysite.com\/htdocs# find . -type d -exec chmod 755 {} \\;\r\nroot@meine:\/var\/www\/mysite.com\/htdocs# find . -type d -exec chown apache2:apache2 {} \\;\r\n<\/pre>\n<p>PLEASE NOTE THIS BREAKS YOUR WORDPRESS ABILITY TO AUTO-UPDATE ITSELF. BUT IT IS MORE SECURE \ud83d\ude00<\/p>\n<p>Note debian users, may need to use www-data:www-data instead.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Let&#8217;s say we have a document root like: It&#8217;s interesting to note the instructions for this will vary from environment to environment, it depends on which user is looking after apache2, etc. \/var\/www\/mysite.com\/htdocs Make all files read\/write and owned by &hellip; <a href=\"https:\/\/haxed.me.uk\/index.php\/2016\/09\/16\/securing-wordpress-chmod-644-chmod-755-easy-pro-way\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33,44,63,10,7,18,61,3,20,16],"tags":[],"class_list":["post-781","post","type-post","status-publish","format-standard","hentry","category-apache","category-cms","category-disk-tools","category-filesystem","category-management-tools","category-php","category-rackspace","category-security","category-webhosting","category-wordpress"],"_links":{"self":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/781","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/comments?post=781"}],"version-history":[{"count":7,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/781\/revisions"}],"predecessor-version":[{"id":792,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/781\/revisions\/792"}],"wp:attachment":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/media?parent=781"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/categories?post=781"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/tags?post=781"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}