Last active
February 17, 2018 18:35
-
-
Save andreleoni/adeea6a8d92e91c59f80d81332cbe978 to your computer and use it in GitHub Desktop.
user permissions for nginx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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