{"id":5213,"date":"2025-12-02T22:07:28","date_gmt":"2025-12-02T22:07:28","guid":{"rendered":"https:\/\/ibex.tech\/cloud\/?p=5213"},"modified":"2025-12-02T22:07:42","modified_gmt":"2025-12-02T22:07:42","slug":"chmod","status":"publish","type":"post","link":"https:\/\/ibex.tech\/cloud\/php\/files\/chmod","title":{"rendered":"chmod"},"content":{"rendered":"\n<p>Typical chmod setting to a sites files and folders:#<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>chmod($Path, 02775);<\/code><\/pre>\n\n\n<p>775 gives:<\/p>\n<p style=\"padding-left: 40px;\">Owner (www-data usually) read+write+execute<br \/>Group read+write+execute<br \/>Others read+execute<\/p>\n<p>The 2 means apply it going forwards to sub folders and files<\/p>\n<p>The 0 is required to forcePHP to interpret the value a octal, otherwise it defaults to decimal which can sometime cause weird permissions to be set<\/p>","protected":false},"excerpt":{"rendered":"<p>Typical chmod setting to a sites files and folders:# 775 gives: Owner (www-data usually) read+write+executeGroup read+write+executeOthers read+execute The 2 means apply it going forwards to sub folders and files The 0 is required to forcePHP to interpret the value a octal, otherwise it defaults to decimal which can sometime cause weird permissions to be set<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[178,58],"tags":[],"class_list":["post-5213","post","type-post","status-publish","format-standard","hentry","category-files-wordpress","category-files"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/5213","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/comments?post=5213"}],"version-history":[{"count":1,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/5213\/revisions"}],"predecessor-version":[{"id":5214,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/5213\/revisions\/5214"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/media?parent=5213"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/categories?post=5213"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/tags?post=5213"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}