{"id":47,"date":"2017-04-12T16:35:48","date_gmt":"2017-04-12T14:35:48","guid":{"rendered":"http:\/\/exoconsult.com\/?p=47"},"modified":"2018-12-12T11:47:50","modified_gmt":"2018-12-12T10:47:50","slug":"fixer-le-groupe-des-nouveaux-fichiers-crees-dans-un-repertoire","status":"publish","type":"post","link":"https:\/\/exoconsult.com\/fr\/serveur\/fixer-le-groupe-des-nouveaux-fichiers-crees-dans-un-repertoire\/","title":{"rendered":"Fixer le groupe des nouveaux fichiers cr\u00e9\u00e9s dans un r\u00e9pertoire"},"content":{"rendered":"<p>If you want all new files in a particular directory to be owned by a particular group, just apply the <em><strong>setgid<\/strong><\/em> bit on it :<\/p>\n<p><code>chgrp www-data \/some\/dir<br \/>\nchmod g+s \/some\/dir<br \/>\n<\/code><\/p>\n<p>If you have an existing tree of directories that you want to apply this behaviour to, you can do so with <em><strong>find <\/strong><\/em>:<\/p>\n<p><code>find \/some\/dir -type d -exec chgrp www-data {} +<br \/>\nfind \/some\/dir -type d -exec chmod g+s {} +<br \/>\n<\/code><\/p>\n<p>(if the directories are already owned by the relevant group, then you can omit the first command in both of these examples).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you want all new files in a particular directory to be owned by a particular group, just apply the setgid bit on it : chgrp www-data \/some\/dir chmod g+s \/some\/dir If you have an existing tree of directories that you want to apply this behaviour to, you can do so with find : find [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"page_builder":"","wds_primary_category":0,"footnotes":""},"categories":[14],"tags":[],"class_list":["post-47","post","type-post","status-publish","format-standard","hentry","category-serveur"],"_links":{"self":[{"href":"https:\/\/exoconsult.com\/fr\/wp-json\/wp\/v2\/posts\/47","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/exoconsult.com\/fr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/exoconsult.com\/fr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/exoconsult.com\/fr\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/exoconsult.com\/fr\/wp-json\/wp\/v2\/comments?post=47"}],"version-history":[{"count":4,"href":"https:\/\/exoconsult.com\/fr\/wp-json\/wp\/v2\/posts\/47\/revisions"}],"predecessor-version":[{"id":52,"href":"https:\/\/exoconsult.com\/fr\/wp-json\/wp\/v2\/posts\/47\/revisions\/52"}],"wp:attachment":[{"href":"https:\/\/exoconsult.com\/fr\/wp-json\/wp\/v2\/media?parent=47"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/exoconsult.com\/fr\/wp-json\/wp\/v2\/categories?post=47"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/exoconsult.com\/fr\/wp-json\/wp\/v2\/tags?post=47"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}