I updated drupal from 9.2.7 to latest version using composer. The update was completed but the site throws "This site currently unable to handle this request.HTTP ERROR 500" I changed the owner as "sudo chown -R username:groupname <drupal_directory>" with backup's username and password. But no use. I applied "chmod 755 -R <drupal_directory>" and the site loaded. But am getting permission errors when I tried a new update with composer. I am sure this problem is because of permission but what is the proper way to fix this problem?
After drupal update site throws HTTP ERROR 500
409 views Asked by Valli Devanathan At
2
There are 2 answers
1
On
Yes. The above script, sets permissions in a, somewhat, restrictive way.
Namely, I feel uncomfortable, setting execute permissions to drush.
Any time I need to run drush, I specifically set execution permissions to drush:
cd /path/to/drupal/installation
chmod 700 vendor/bin/drush
Then, I can run the necessary drush commands.
If You find this tedious, just add:
chmod 700 ${site_base_directory}/vendor/bin/drush
at the end of the script above.
Generally, I create some bash script so that I can run it every time I run some updates or make any change to the Drupal installation.
The script may be something like:
Of course, clearing the caches is also a good idea.