Skip to content

Instantly share code, notes, and snippets.

@GreenSkunk
GreenSkunk / fix-drupal8-permissions.sh
Last active Nov 26, 2020
Drupal - Bash shell script to fix Drupal 8 permissions where the PHP Handler is FastCGI.
View fix-drupal8-permissions.sh
#!/bin/bash
path=${1%/}
user=${2}
group=${2}
help="\nHelp: This script is used to fix permissions of a Drupal 8 installation in which the PHP Handler is FastCGI\nYou need to provide the following arguments:\n\t 1) Path to your drupal installation\n\t 2) Username of the user that you want to give files/directories ownership\n\nNote: This script assumes that the group is the same as the username if your PHP is compiled to run as FastCGI. If this is different you need to modify it manually by editing this script or checking out forks on GitHub.\nUsage: bash ${0##*/} drupal_path user_name\n"
echo "Refer to https://www.Drupal.org/node/244924"
@GreenSkunk
GreenSkunk / fix-drupal7-permissions.sh
Created Nov 28, 2016
Drupal - Bash shell script to fix Drupal 7 permissions where the PHP Handler is FastCGI. Forked from https://gist.github.com/mejpark/2294266
View fix-drupal7-permissions.sh
#!/bin/bash
path=${1%/}
user=${2}
group=${2}
help="\nHelp: This script is used to fix permissions of a Drupal 7 installation\nwhere the PHP Handler is FastCGI\nyou need to provide the following arguments:\n\t 1) Path to your drupal installation\n\t 2) Username of the user that you want to give files/directories ownership\n\nNote: This script assumes that the group is the same as the username if your PHP is compiled to run as FastCGI. If this is different you need to modify it manually by editing this script or checking out forks on GitHub.\nUsage: bash ${0##*/} drupal_path user_name\n"
echo "Refer to https://www.Drupal.org/node/244924"