@see https://www.drupal.org/node/244924
Copy the code above to a file, name it fix-permissions.sh
and run it as follows:
sudo bash fix-permissions.sh --drupal_path=your/drupal/path --drupal_user=your_user_name
Note: The server group name is assumed www-data
, if it differs use the --httpd_group=GROUP
argument.