{"id":248,"date":"2008-05-18T19:11:18","date_gmt":"2008-05-18T19:11:18","guid":{"rendered":"https:\/\/www.garfnet.org.uk\/cms\/setting-file-a-directory-properties\/"},"modified":"2024-12-06T03:05:56","modified_gmt":"2024-12-06T03:05:56","slug":"setting-file-a-directory-properties","status":"publish","type":"post","link":"https:\/\/garfnet.org.uk\/cms\/2008\/05\/18\/setting-file-a-directory-properties\/","title":{"rendered":"Setting file and directory properties separately and recursively"},"content":{"rendered":"<p>Sometimes in GNU\/Linux one needs to set file and directory permissions separately and recursively. This is a way to do it.<\/p>\n<h2><strong>Set file permissions:-<\/strong><\/h2>\n<pre>find . -type f -print0 | xargs -0 chmod 644 ;<\/pre>\n<h2>Set directory permissions-<\/h2>\n<pre>find . -type d -exec chmod 755 \\{\\} \\;<\/pre>\n<p>Note these are powerful commands with which you can do great harm. So please use with care.<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes in GNU\/Linux one needs to set file and directory permissions separately and recursively. This is a way to do it. Set file permissions:- find . -type f -print0 | xargs -0 chmod 644 ; Set directory permissions- find . -type d -exec chmod 755 \\{\\} \\; Note these are powerful commands with which you&#8230;<\/p>\n","protected":false},"author":1,"featured_media":26710,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"_kad_post_transparent":"default","_kad_post_title":"default","_kad_post_layout":"default","_kad_post_sidebar_id":"","_kad_post_content_style":"default","_kad_post_vertical_padding":"default","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[12,6,691,18],"tags":[],"class_list":["post-248","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-faq","category-journal","category-linux","category-technology"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Setting file and directory properties separately and recursively - GarfNet<\/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:\/\/garfnet.org.uk\/cms\/2008\/05\/18\/setting-file-a-directory-properties\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Setting file and directory properties separately and recursively - GarfNet\" \/>\n<meta property=\"og:description\" content=\"Sometimes in GNU\/Linux one needs to set file and directory permissions separately and recursively. This is a way to do it. Set file permissions:- find . -type f -print0 | xargs -0 chmod 644 ; Set directory permissions- find . -type d -exec chmod 755 {} ; Note these are powerful commands with which you...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/garfnet.org.uk\/cms\/2008\/05\/18\/setting-file-a-directory-properties\/\" \/>\n<meta property=\"og:site_name\" content=\"GarfNet\" \/>\n<meta property=\"article:published_time\" content=\"2008-05-18T19:11:18+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-12-06T03:05:56+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/garfnet.org.uk\/cms\/wp-content\/uploads\/2008\/02\/linux-inside.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"800\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Garf\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Garf\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/garfnet.org.uk\\\/cms\\\/2008\\\/05\\\/18\\\/setting-file-a-directory-properties\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/garfnet.org.uk\\\/cms\\\/2008\\\/05\\\/18\\\/setting-file-a-directory-properties\\\/\"},\"author\":{\"name\":\"Garf\",\"@id\":\"https:\\\/\\\/garfnet.org.uk\\\/cms\\\/#\\\/schema\\\/person\\\/27529e0ea0460ec8c299743f70c06635\"},\"headline\":\"Setting file and directory properties separately and recursively\",\"datePublished\":\"2008-05-18T19:11:18+00:00\",\"dateModified\":\"2024-12-06T03:05:56+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/garfnet.org.uk\\\/cms\\\/2008\\\/05\\\/18\\\/setting-file-a-directory-properties\\\/\"},\"wordCount\":54,\"publisher\":{\"@id\":\"https:\\\/\\\/garfnet.org.uk\\\/cms\\\/#\\\/schema\\\/person\\\/27529e0ea0460ec8c299743f70c06635\"},\"image\":{\"@id\":\"https:\\\/\\\/garfnet.org.uk\\\/cms\\\/2008\\\/05\\\/18\\\/setting-file-a-directory-properties\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/garfnet.org.uk\\\/cms\\\/wp-content\\\/uploads\\\/2008\\\/02\\\/linux-inside.jpg\",\"articleSection\":[\"FAQ\",\"Journal\",\"Linux\",\"Technology\"],\"inLanguage\":\"en-GB\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/garfnet.org.uk\\\/cms\\\/2008\\\/05\\\/18\\\/setting-file-a-directory-properties\\\/\",\"url\":\"https:\\\/\\\/garfnet.org.uk\\\/cms\\\/2008\\\/05\\\/18\\\/setting-file-a-directory-properties\\\/\",\"name\":\"Setting file and directory properties separately and recursively - GarfNet\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/garfnet.org.uk\\\/cms\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/garfnet.org.uk\\\/cms\\\/2008\\\/05\\\/18\\\/setting-file-a-directory-properties\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/garfnet.org.uk\\\/cms\\\/2008\\\/05\\\/18\\\/setting-file-a-directory-properties\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/garfnet.org.uk\\\/cms\\\/wp-content\\\/uploads\\\/2008\\\/02\\\/linux-inside.jpg\",\"datePublished\":\"2008-05-18T19:11:18+00:00\",\"dateModified\":\"2024-12-06T03:05:56+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/garfnet.org.uk\\\/cms\\\/2008\\\/05\\\/18\\\/setting-file-a-directory-properties\\\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/garfnet.org.uk\\\/cms\\\/2008\\\/05\\\/18\\\/setting-file-a-directory-properties\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/garfnet.org.uk\\\/cms\\\/2008\\\/05\\\/18\\\/setting-file-a-directory-properties\\\/#primaryimage\",\"url\":\"https:\\\/\\\/garfnet.org.uk\\\/cms\\\/wp-content\\\/uploads\\\/2008\\\/02\\\/linux-inside.jpg\",\"contentUrl\":\"https:\\\/\\\/garfnet.org.uk\\\/cms\\\/wp-content\\\/uploads\\\/2008\\\/02\\\/linux-inside.jpg\",\"width\":1200,\"height\":800},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/garfnet.org.uk\\\/cms\\\/2008\\\/05\\\/18\\\/setting-file-a-directory-properties\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/garfnet.org.uk\\\/cms\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Setting file and directory properties separately and recursively\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/garfnet.org.uk\\\/cms\\\/#website\",\"url\":\"https:\\\/\\\/garfnet.org.uk\\\/cms\\\/\",\"name\":\"GarfNet\",\"description\":\"Penguin-powered and full of Unixy goodness, since 1995...\",\"publisher\":{\"@id\":\"https:\\\/\\\/garfnet.org.uk\\\/cms\\\/#\\\/schema\\\/person\\\/27529e0ea0460ec8c299743f70c06635\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/garfnet.org.uk\\\/cms\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/garfnet.org.uk\\\/cms\\\/#\\\/schema\\\/person\\\/27529e0ea0460ec8c299743f70c06635\",\"name\":\"Garf\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/garfnet.org.uk\\\/cms\\\/wp-content\\\/uploads\\\/2024\\\/07\\\/garflogo-garfnet-1.png\",\"url\":\"https:\\\/\\\/garfnet.org.uk\\\/cms\\\/wp-content\\\/uploads\\\/2024\\\/07\\\/garflogo-garfnet-1.png\",\"contentUrl\":\"https:\\\/\\\/garfnet.org.uk\\\/cms\\\/wp-content\\\/uploads\\\/2024\\\/07\\\/garflogo-garfnet-1.png\",\"width\":2420,\"height\":1928,\"caption\":\"Garf\"},\"logo\":{\"@id\":\"https:\\\/\\\/garfnet.org.uk\\\/cms\\\/wp-content\\\/uploads\\\/2024\\\/07\\\/garflogo-garfnet-1.png\"},\"url\":\"https:\\\/\\\/garfnet.org.uk\\\/cms\\\/author\\\/garf-admin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Setting file and directory properties separately and recursively - GarfNet","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:\/\/garfnet.org.uk\/cms\/2008\/05\/18\/setting-file-a-directory-properties\/","og_locale":"en_GB","og_type":"article","og_title":"Setting file and directory properties separately and recursively - GarfNet","og_description":"Sometimes in GNU\/Linux one needs to set file and directory permissions separately and recursively. This is a way to do it. Set file permissions:- find . -type f -print0 | xargs -0 chmod 644 ; Set directory permissions- find . -type d -exec chmod 755 {} ; Note these are powerful commands with which you...","og_url":"https:\/\/garfnet.org.uk\/cms\/2008\/05\/18\/setting-file-a-directory-properties\/","og_site_name":"GarfNet","article_published_time":"2008-05-18T19:11:18+00:00","article_modified_time":"2024-12-06T03:05:56+00:00","og_image":[{"width":1200,"height":800,"url":"https:\/\/garfnet.org.uk\/cms\/wp-content\/uploads\/2008\/02\/linux-inside.jpg","type":"image\/jpeg"}],"author":"Garf","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Garf","Estimated reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/garfnet.org.uk\/cms\/2008\/05\/18\/setting-file-a-directory-properties\/#article","isPartOf":{"@id":"https:\/\/garfnet.org.uk\/cms\/2008\/05\/18\/setting-file-a-directory-properties\/"},"author":{"name":"Garf","@id":"https:\/\/garfnet.org.uk\/cms\/#\/schema\/person\/27529e0ea0460ec8c299743f70c06635"},"headline":"Setting file and directory properties separately and recursively","datePublished":"2008-05-18T19:11:18+00:00","dateModified":"2024-12-06T03:05:56+00:00","mainEntityOfPage":{"@id":"https:\/\/garfnet.org.uk\/cms\/2008\/05\/18\/setting-file-a-directory-properties\/"},"wordCount":54,"publisher":{"@id":"https:\/\/garfnet.org.uk\/cms\/#\/schema\/person\/27529e0ea0460ec8c299743f70c06635"},"image":{"@id":"https:\/\/garfnet.org.uk\/cms\/2008\/05\/18\/setting-file-a-directory-properties\/#primaryimage"},"thumbnailUrl":"https:\/\/garfnet.org.uk\/cms\/wp-content\/uploads\/2008\/02\/linux-inside.jpg","articleSection":["FAQ","Journal","Linux","Technology"],"inLanguage":"en-GB"},{"@type":"WebPage","@id":"https:\/\/garfnet.org.uk\/cms\/2008\/05\/18\/setting-file-a-directory-properties\/","url":"https:\/\/garfnet.org.uk\/cms\/2008\/05\/18\/setting-file-a-directory-properties\/","name":"Setting file and directory properties separately and recursively - GarfNet","isPartOf":{"@id":"https:\/\/garfnet.org.uk\/cms\/#website"},"primaryImageOfPage":{"@id":"https:\/\/garfnet.org.uk\/cms\/2008\/05\/18\/setting-file-a-directory-properties\/#primaryimage"},"image":{"@id":"https:\/\/garfnet.org.uk\/cms\/2008\/05\/18\/setting-file-a-directory-properties\/#primaryimage"},"thumbnailUrl":"https:\/\/garfnet.org.uk\/cms\/wp-content\/uploads\/2008\/02\/linux-inside.jpg","datePublished":"2008-05-18T19:11:18+00:00","dateModified":"2024-12-06T03:05:56+00:00","breadcrumb":{"@id":"https:\/\/garfnet.org.uk\/cms\/2008\/05\/18\/setting-file-a-directory-properties\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/garfnet.org.uk\/cms\/2008\/05\/18\/setting-file-a-directory-properties\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/garfnet.org.uk\/cms\/2008\/05\/18\/setting-file-a-directory-properties\/#primaryimage","url":"https:\/\/garfnet.org.uk\/cms\/wp-content\/uploads\/2008\/02\/linux-inside.jpg","contentUrl":"https:\/\/garfnet.org.uk\/cms\/wp-content\/uploads\/2008\/02\/linux-inside.jpg","width":1200,"height":800},{"@type":"BreadcrumbList","@id":"https:\/\/garfnet.org.uk\/cms\/2008\/05\/18\/setting-file-a-directory-properties\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/garfnet.org.uk\/cms\/"},{"@type":"ListItem","position":2,"name":"Setting file and directory properties separately and recursively"}]},{"@type":"WebSite","@id":"https:\/\/garfnet.org.uk\/cms\/#website","url":"https:\/\/garfnet.org.uk\/cms\/","name":"GarfNet","description":"Penguin-powered and full of Unixy goodness, since 1995...","publisher":{"@id":"https:\/\/garfnet.org.uk\/cms\/#\/schema\/person\/27529e0ea0460ec8c299743f70c06635"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/garfnet.org.uk\/cms\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":["Person","Organization"],"@id":"https:\/\/garfnet.org.uk\/cms\/#\/schema\/person\/27529e0ea0460ec8c299743f70c06635","name":"Garf","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/garfnet.org.uk\/cms\/wp-content\/uploads\/2024\/07\/garflogo-garfnet-1.png","url":"https:\/\/garfnet.org.uk\/cms\/wp-content\/uploads\/2024\/07\/garflogo-garfnet-1.png","contentUrl":"https:\/\/garfnet.org.uk\/cms\/wp-content\/uploads\/2024\/07\/garflogo-garfnet-1.png","width":2420,"height":1928,"caption":"Garf"},"logo":{"@id":"https:\/\/garfnet.org.uk\/cms\/wp-content\/uploads\/2024\/07\/garflogo-garfnet-1.png"},"url":"https:\/\/garfnet.org.uk\/cms\/author\/garf-admin\/"}]}},"_links":{"self":[{"href":"https:\/\/garfnet.org.uk\/cms\/wp-json\/wp\/v2\/posts\/248","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/garfnet.org.uk\/cms\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/garfnet.org.uk\/cms\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/garfnet.org.uk\/cms\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/garfnet.org.uk\/cms\/wp-json\/wp\/v2\/comments?post=248"}],"version-history":[{"count":3,"href":"https:\/\/garfnet.org.uk\/cms\/wp-json\/wp\/v2\/posts\/248\/revisions"}],"predecessor-version":[{"id":26779,"href":"https:\/\/garfnet.org.uk\/cms\/wp-json\/wp\/v2\/posts\/248\/revisions\/26779"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/garfnet.org.uk\/cms\/wp-json\/wp\/v2\/media\/26710"}],"wp:attachment":[{"href":"https:\/\/garfnet.org.uk\/cms\/wp-json\/wp\/v2\/media?parent=248"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/garfnet.org.uk\/cms\/wp-json\/wp\/v2\/categories?post=248"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/garfnet.org.uk\/cms\/wp-json\/wp\/v2\/tags?post=248"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}