Skip to content

Instantly share code, notes, and snippets.

@brunops
Last active October 13, 2015 05:48
Show Gist options
  • Save brunops/4148926 to your computer and use it in GitHub Desktop.
Save brunops/4148926 to your computer and use it in GitHub Desktop.
Drupal files permissions
# Include your user in www-data group
# This command needs to be run only once
useradd -G www-data brunops
# File User/Group owners
sudo chown -R brunops:www-data /path/to/folder --preserve-root
# Drupal file permissions
# Execution perm for files
sudo find /path/to/folder -type f -print0 | xargs -0 sudo chmod 644 --preserve-root
# Execution perm for folders
sudo find /path/to/folder -type d -print0 | xargs -0 sudo chmod 755 --preserve-root
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment