I'm using Drupal 8 and the Flysystem module to configure remote file storage via SFTP. My question probably applies in general, though.
When a file is uploaded, and the file directory setting has a value, then Drupal creates a subdirectory if it doesn't already exist in the remote location. For example, the file directory defaults to [date:custom:Y]-[date:custom:m] to organize files by month. I need to set the permissions of these subdirectories. Currently, they're defaulting to 744. How do I change this? I'm hoping there is either a global setting, a hook, or a way to set the permissions in a module.
Thank you in advance for your help!