Skip to content

leo-graf/drupal_permissions_script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Drupal Permissions Script

If you have sufficient privileges on your server:

  • Place the file in /usr/local/bin
  • sudo chown root:root /usr/local/bin/drupal-permissions.sh
  • sudo vi /etc/sudoers.d/drupal-permissions and enter the following line in the file
    user1, user2 ALL = (root) NOPASSWD: /usr/local/bin/drupal-permissions.sh
    Note: Substitute your desired comma separated list of users where you see user1, user2 above. Alternatively, you could enter an ALIAS for a user list. Run man sudoers for more information on formatting the line.
  • Save the file and then sudo chmod 0440 /etc/sudoers.d/drupal-permissions

What the /etc/sudoers.d/drupal-permissions accomplishes is making the script available to a set of users via the sudo command without having to enter a password.

Run the script 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.

About

Set drupal file and folder permissions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages