{"id":1751,"date":"2013-11-08T18:02:59","date_gmt":"2013-11-08T18:02:59","guid":{"rendered":"https:\/\/www.uk-cheapest.co.uk\/support\/?p=1751"},"modified":"2024-01-05T20:11:29","modified_gmt":"2024-01-05T20:11:29","slug":"find-all-wordpress-folders-with-777-permissions","status":"publish","type":"post","link":"https:\/\/www.uk-cheapest.co.uk\/support\/find-all-wordpress-folders-with-777-permissions\/","title":{"rendered":"Find all WordPress folders with 777 permissions"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"h-how-to-find-all-folders-with-777-permissions\">How to find all folders with 777 permissions<\/h2>\n\n\n\n<p><br>As the owner of a dedicated server provided shared hosting services, you will find that many of your clients will install applications such as WordPress. So far so good. However, once they start getting stuck with file and folder permissions, they generally go crazy and set everything to 777 in order to fix the problems. Great, they get their site working! Now begin your problems.<\/p>\n\n\n\n<p>With these liberal file and folder permissions together with some not-so-well written plugins, it is only a matter of time before the hackers and crackers target these weak WordPress sites and start injecting all manner of redirects and mail spammers on your server.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-using-find-to-locate-those-weaknesses\">Using &#8216;find&#8217; to locate those weaknesses<\/h2>\n\n\n\n<p>So, here is a nifty solution to find all those weak WordPress installations. The following find will list all WordPress installations that contain folders with 777 permissions:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">find \/var\/www\/vhosts\/*\/httpdocs\/wp-content -perm 0777 -type d | grep -v \"wp-content\/\"<\/pre>\n\n\n\n<p>Give this a whirl on your Plesk server and take a look at the list, navigate to each folder and tighten up the permissions as below:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">cd \/var\/www\/vhosts\/dodgydomain.co.uk\/httpdocs\nfind . -type d -exec chmod 755 {} \\;\nfind . -type f -exec chmod 644 {} \\;\nchmod 750 ..\/httpdocs<\/pre>\n\n\n\n<p>These permission changes eliminate all unnecessary 777 permissions.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-ok-let-s-automate-the-whole-process\">Ok, let&#8217;s automate the whole process<\/h2>\n\n\n\n<p>What? You have lots of these? Then here is a nifty script to automate the process for you:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">df=`find \/var\/www\/vhosts\/*\/httpdocs\/wp-content -perm 0777 -type d | grep -v \"wp-content\/\" \\\n| sed \"s\/wp-content\/\/g\"`\n\nfor line in $df;\n&nbsp; do\n&nbsp; &nbsp; echo $line\n&nbsp; &nbsp; cd $line\n&nbsp; &nbsp; find $line -type d -exec chmod 755 {} \\;\n&nbsp; &nbsp; find $line -type f -exec chmod 644 {} \\;\n&nbsp; &nbsp; chmod 750 $line\n&nbsp; done<\/pre>\n\n\n\n<p>This makes things a little more difficult for any would-be injection attempts. If your directory structure is different to the standard Plesk structure simply modify the find command as required.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to find all folders with 777 permissions As the owner of a dedicated server provided shared hosting services, you will find that many of your clients will install applications such as WordPress. So far so good. However, once they start getting stuck with file and folder permissions, they generally go crazy and set everything &#8230; <a title=\"Find all WordPress folders with 777 permissions\" class=\"read-more\" href=\"https:\/\/www.uk-cheapest.co.uk\/support\/find-all-wordpress-folders-with-777-permissions\/\" aria-label=\"Read more about Find all WordPress folders with 777 permissions\">Read more&#8230;<\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"generate_page_header":"","footnotes":""},"categories":[166,243,64],"tags":[],"class_list":["post-1751","post","type-post","status-publish","format-standard","hentry","category-dedicated-servers","category-plesk-11","category-wordpress-support"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Find all Wordpress folders with 777 permissions - UK-Cheapest.co.uk<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.uk-cheapest.co.uk\/support\/find-all-wordpress-folders-with-777-permissions\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Find all Wordpress folders with 777 permissions - UK-Cheapest.co.uk\" \/>\n<meta property=\"og:description\" content=\"How to find all folders with 777 permissions As the owner of a dedicated server provided shared hosting services, you will find that many of your clients will install applications such as WordPress. So far so good. However, once they start getting stuck with file and folder permissions, they generally go crazy and set everything ... Read more...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.uk-cheapest.co.uk\/support\/find-all-wordpress-folders-with-777-permissions\/\" \/>\n<meta property=\"og:site_name\" content=\"UK-Cheapest.co.uk\" \/>\n<meta property=\"article:published_time\" content=\"2013-11-08T18:02:59+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-05T20:11:29+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.uk-cheapest.co.uk\/support\/wp-content\/uploads\/2023\/12\/IMG_3064.jpeg\" \/>\n\t<meta property=\"og:image:width\" content=\"768\" \/>\n\t<meta property=\"og:image:height\" content=\"439\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"UKC\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@ukchelpdesk\" \/>\n<meta name=\"twitter:site\" content=\"@ukchelpdesk\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"UKC\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.uk-cheapest.co.uk\\\/support\\\/find-all-wordpress-folders-with-777-permissions\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.uk-cheapest.co.uk\\\/support\\\/find-all-wordpress-folders-with-777-permissions\\\/\"},\"author\":{\"name\":\"UKC\",\"@id\":\"https:\\\/\\\/www.uk-cheapest.co.uk\\\/support\\\/#\\\/schema\\\/person\\\/135cf981b8a3a120603fcbc027eed746\"},\"headline\":\"Find all WordPress folders with 777 permissions\",\"datePublished\":\"2013-11-08T18:02:59+00:00\",\"dateModified\":\"2024-01-05T20:11:29+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.uk-cheapest.co.uk\\\/support\\\/find-all-wordpress-folders-with-777-permissions\\\/\"},\"wordCount\":239,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.uk-cheapest.co.uk\\\/support\\\/#organization\"},\"articleSection\":[\"Dedicated Servers\",\"Plesk 11\",\"Wordpress\"],\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.uk-cheapest.co.uk\\\/support\\\/find-all-wordpress-folders-with-777-permissions\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.uk-cheapest.co.uk\\\/support\\\/find-all-wordpress-folders-with-777-permissions\\\/\",\"url\":\"https:\\\/\\\/www.uk-cheapest.co.uk\\\/support\\\/find-all-wordpress-folders-with-777-permissions\\\/\",\"name\":\"Find all Wordpress folders with 777 permissions - UK-Cheapest.co.uk\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.uk-cheapest.co.uk\\\/support\\\/#website\"},\"datePublished\":\"2013-11-08T18:02:59+00:00\",\"dateModified\":\"2024-01-05T20:11:29+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.uk-cheapest.co.uk\\\/support\\\/find-all-wordpress-folders-with-777-permissions\\\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.uk-cheapest.co.uk\\\/support\\\/find-all-wordpress-folders-with-777-permissions\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.uk-cheapest.co.uk\\\/support\\\/find-all-wordpress-folders-with-777-permissions\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"UK-Cheapest.co.uk\",\"item\":\"https:\\\/\\\/www.uk-cheapest.co.uk\\\/support\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Find all WordPress folders with 777 permissions\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.uk-cheapest.co.uk\\\/support\\\/#website\",\"url\":\"https:\\\/\\\/www.uk-cheapest.co.uk\\\/support\\\/\",\"name\":\"UK-Cheapest.co.uk\",\"description\":\"Cheap Domain Names, Web Hosting, Site Builder &amp; Web Security\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.uk-cheapest.co.uk\\\/support\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.uk-cheapest.co.uk\\\/support\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.uk-cheapest.co.uk\\\/support\\\/#organization\",\"name\":\"UKC\",\"url\":\"https:\\\/\\\/www.uk-cheapest.co.uk\\\/support\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/www.uk-cheapest.co.uk\\\/support\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.uk-cheapest.co.uk\\\/support\\\/wp-content\\\/uploads\\\/2023\\\/12\\\/Screenshot-2023-12-14-at-17.40.07.png\",\"contentUrl\":\"https:\\\/\\\/www.uk-cheapest.co.uk\\\/support\\\/wp-content\\\/uploads\\\/2023\\\/12\\\/Screenshot-2023-12-14-at-17.40.07.png\",\"width\":217,\"height\":55,\"caption\":\"UKC\"},\"image\":{\"@id\":\"https:\\\/\\\/www.uk-cheapest.co.uk\\\/support\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/x.com\\\/ukchelpdesk\",\"https:\\\/\\\/www.instagram.com\\\/ukc_hosting\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.uk-cheapest.co.uk\\\/support\\\/#\\\/schema\\\/person\\\/135cf981b8a3a120603fcbc027eed746\",\"name\":\"UKC\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/afbfe91204852778e8698de79f854348bec9aea508bef650c084d0c6daf2588d?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/afbfe91204852778e8698de79f854348bec9aea508bef650c084d0c6daf2588d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/afbfe91204852778e8698de79f854348bec9aea508bef650c084d0c6daf2588d?s=96&d=mm&r=g\",\"caption\":\"UKC\"},\"sameAs\":[\"https:\\\/\\\/www.uk-cheapest.co.uk\"],\"url\":\"https:\\\/\\\/www.uk-cheapest.co.uk\\\/support\\\/author\\\/colin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Find all Wordpress folders with 777 permissions - UK-Cheapest.co.uk","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.uk-cheapest.co.uk\/support\/find-all-wordpress-folders-with-777-permissions\/","og_locale":"en_GB","og_type":"article","og_title":"Find all Wordpress folders with 777 permissions - UK-Cheapest.co.uk","og_description":"How to find all folders with 777 permissions As the owner of a dedicated server provided shared hosting services, you will find that many of your clients will install applications such as WordPress. So far so good. However, once they start getting stuck with file and folder permissions, they generally go crazy and set everything ... Read more...","og_url":"https:\/\/www.uk-cheapest.co.uk\/support\/find-all-wordpress-folders-with-777-permissions\/","og_site_name":"UK-Cheapest.co.uk","article_published_time":"2013-11-08T18:02:59+00:00","article_modified_time":"2024-01-05T20:11:29+00:00","og_image":[{"width":768,"height":439,"url":"https:\/\/www.uk-cheapest.co.uk\/support\/wp-content\/uploads\/2023\/12\/IMG_3064.jpeg","type":"image\/jpeg"}],"author":"UKC","twitter_card":"summary_large_image","twitter_creator":"@ukchelpdesk","twitter_site":"@ukchelpdesk","twitter_misc":{"Written by":"UKC","Estimated reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.uk-cheapest.co.uk\/support\/find-all-wordpress-folders-with-777-permissions\/#article","isPartOf":{"@id":"https:\/\/www.uk-cheapest.co.uk\/support\/find-all-wordpress-folders-with-777-permissions\/"},"author":{"name":"UKC","@id":"https:\/\/www.uk-cheapest.co.uk\/support\/#\/schema\/person\/135cf981b8a3a120603fcbc027eed746"},"headline":"Find all WordPress folders with 777 permissions","datePublished":"2013-11-08T18:02:59+00:00","dateModified":"2024-01-05T20:11:29+00:00","mainEntityOfPage":{"@id":"https:\/\/www.uk-cheapest.co.uk\/support\/find-all-wordpress-folders-with-777-permissions\/"},"wordCount":239,"commentCount":0,"publisher":{"@id":"https:\/\/www.uk-cheapest.co.uk\/support\/#organization"},"articleSection":["Dedicated Servers","Plesk 11","Wordpress"],"inLanguage":"en-GB","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.uk-cheapest.co.uk\/support\/find-all-wordpress-folders-with-777-permissions\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.uk-cheapest.co.uk\/support\/find-all-wordpress-folders-with-777-permissions\/","url":"https:\/\/www.uk-cheapest.co.uk\/support\/find-all-wordpress-folders-with-777-permissions\/","name":"Find all Wordpress folders with 777 permissions - UK-Cheapest.co.uk","isPartOf":{"@id":"https:\/\/www.uk-cheapest.co.uk\/support\/#website"},"datePublished":"2013-11-08T18:02:59+00:00","dateModified":"2024-01-05T20:11:29+00:00","breadcrumb":{"@id":"https:\/\/www.uk-cheapest.co.uk\/support\/find-all-wordpress-folders-with-777-permissions\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.uk-cheapest.co.uk\/support\/find-all-wordpress-folders-with-777-permissions\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.uk-cheapest.co.uk\/support\/find-all-wordpress-folders-with-777-permissions\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"UK-Cheapest.co.uk","item":"https:\/\/www.uk-cheapest.co.uk\/support\/"},{"@type":"ListItem","position":2,"name":"Find all WordPress folders with 777 permissions"}]},{"@type":"WebSite","@id":"https:\/\/www.uk-cheapest.co.uk\/support\/#website","url":"https:\/\/www.uk-cheapest.co.uk\/support\/","name":"UK-Cheapest.co.uk","description":"Cheap Domain Names, Web Hosting, Site Builder &amp; Web Security","publisher":{"@id":"https:\/\/www.uk-cheapest.co.uk\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.uk-cheapest.co.uk\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/www.uk-cheapest.co.uk\/support\/#organization","name":"UKC","url":"https:\/\/www.uk-cheapest.co.uk\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.uk-cheapest.co.uk\/support\/#\/schema\/logo\/image\/","url":"https:\/\/www.uk-cheapest.co.uk\/support\/wp-content\/uploads\/2023\/12\/Screenshot-2023-12-14-at-17.40.07.png","contentUrl":"https:\/\/www.uk-cheapest.co.uk\/support\/wp-content\/uploads\/2023\/12\/Screenshot-2023-12-14-at-17.40.07.png","width":217,"height":55,"caption":"UKC"},"image":{"@id":"https:\/\/www.uk-cheapest.co.uk\/support\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/ukchelpdesk","https:\/\/www.instagram.com\/ukc_hosting\/"]},{"@type":"Person","@id":"https:\/\/www.uk-cheapest.co.uk\/support\/#\/schema\/person\/135cf981b8a3a120603fcbc027eed746","name":"UKC","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/secure.gravatar.com\/avatar\/afbfe91204852778e8698de79f854348bec9aea508bef650c084d0c6daf2588d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/afbfe91204852778e8698de79f854348bec9aea508bef650c084d0c6daf2588d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/afbfe91204852778e8698de79f854348bec9aea508bef650c084d0c6daf2588d?s=96&d=mm&r=g","caption":"UKC"},"sameAs":["https:\/\/www.uk-cheapest.co.uk"],"url":"https:\/\/www.uk-cheapest.co.uk\/support\/author\/colin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.uk-cheapest.co.uk\/support\/wp-json\/wp\/v2\/posts\/1751","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.uk-cheapest.co.uk\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.uk-cheapest.co.uk\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.uk-cheapest.co.uk\/support\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.uk-cheapest.co.uk\/support\/wp-json\/wp\/v2\/comments?post=1751"}],"version-history":[{"count":9,"href":"https:\/\/www.uk-cheapest.co.uk\/support\/wp-json\/wp\/v2\/posts\/1751\/revisions"}],"predecessor-version":[{"id":4627,"href":"https:\/\/www.uk-cheapest.co.uk\/support\/wp-json\/wp\/v2\/posts\/1751\/revisions\/4627"}],"wp:attachment":[{"href":"https:\/\/www.uk-cheapest.co.uk\/support\/wp-json\/wp\/v2\/media?parent=1751"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.uk-cheapest.co.uk\/support\/wp-json\/wp\/v2\/categories?post=1751"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.uk-cheapest.co.uk\/support\/wp-json\/wp\/v2\/tags?post=1751"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}