hxa5ma
Last Updated: February 25, 2016
·
521
· rican7

*nix: Default group for files in directory

Ever wish you could change the default group for new files/directories in a Unix/Linux-based directory? Tired of creating a new file/directory and having to "chmod" it?

Boom:

sudo chown root:webserver /srv/www/ -R
sudo chmod g+s www/ -R
sudo chmod 774 www/ -R