Recommended file permissions Similarly to what described in https://www.drupal.org/node/244924, which is for Drupal 7, is there any script to set the right permissions for Drupal 8?

How can we take care of the file permissions for contributed modules? For example, I know a few modules which would have different permissions for files like .htaccess and other private folders in the modules. Is there a way we can reset the file permissions to initial versions?
I've been running the same script included on that page for sites running either Drupal 7 or Drupal 8, with no adverse effects. I would recommend just using that.