When creating directory using function drupal_mkdir in custom module, how to set folder permission access to "Create and delete files"?
drupal_mkdir('public://myfolder/');
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.
Sign up to join this communityWhen creating directory using function drupal_mkdir in custom module, how to set folder permission access to "Create and delete files"?
drupal_mkdir('public://myfolder/');
The second parameter is $mode
, which you can provide. e.g.
drupal_mkdir('public://myfolder/', 0755);
By default the 'file_chmod_directory; will be used, which, by default, is 0775.
Exactly what mode you use will obviously depend on your server set up. If you're not sure, ask your sysadmin what it should be.