Skip to content

Instantly share code, notes, and snippets.

@andreleoni
Last active February 17, 2018 18:35
Show Gist options
  • Select an option

  • Save andreleoni/adeea6a8d92e91c59f80d81332cbe978 to your computer and use it in GitHub Desktop.

Select an option

Save andreleoni/adeea6a8d92e91c59f80d81332cbe978 to your computer and use it in GitHub Desktop.
user permissions for nginx
# Create groups
sudo groupadd www-data
# Add users to group
sudo usermod -a -G www-data $(whoami)
sudo usermod -a -G www-data root
# Add users to www-data
sudo usermod -a -G www-data root
# Change user groups
chown -R www-data:www-data *
# List all users group Groups
grep www-data /etc/group
# Change user / groups permissions
sudo find site -type d -exec chmod 755 {} \;
sudo find site -type f -exec chmod 644 {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment