Skip to content

Instantly share code, notes, and snippets.

View JonathRocha's full-sized avatar
🚀
Keep coding!

Jonathan Rocha JonathRocha

🚀
Keep coding!
  • Brazil
View GitHub Profile
// https://askubuntu.com/a/51953
// If you want all new files in a particular directory to be owned by a particular group, just apply the setgid bit on it:
chgrp www-data /some/dir
chmod g+s /some/dir
// If you have an existing tree of directories that you want to apply this behaviour to, you can do so with find:
find /some/dir -type d -exec chgrp www-data {} +