- 🇺🇸United States micahw156
I found this issue while researching another problem.
As noted by @kalabro in https://www.drupal.org/node/244924#comment-8186447 → this should actually be set in decimal.
I just tested setting my desired permissions of 2775 using $settings['file_chmod_directory'] = 1533; and it worked as intended for both mkdir and chmod with the file_system service.
I'm pretty sure this is just a documentation issue.
I thought about creating a patch for this, using the octdec() conversion for clarity, but I don't love the solution, so I'm just going to insert a diff here instead. Hopefully someone can improve on this.
diff --git a/sites/default/default.settings.php b/sites/default/default.settings.php index 5615be3dc0..6b6bae14ea 100644 --- a/sites/default/default.settings.php +++ b/sites/default/default.settings.php @@ -481,10 +481,11 @@ /** * Default mode for directories and files written by Drupal. * - * Value should be in PHP Octal Notation, with leading zero. + * Value should be converted to decimal from PHP Octal Notation, + * with leading zero. */ -# $settings['file_chmod_directory'] = 0775; -# $settings['file_chmod_file'] = 0664; +# $settings['file_chmod_directory'] = octdec('0775'); +# $settings['file_chmod_file'] = octdec('0664'); /** * Public file base URL: