Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Third, if you create subfolders this happens,

...

setgid Recursively for Only Folders

In this case, we want to take an existing folder with many files for a zero footprint application and ensure that any new files created will belong to the right group.

We use the chmod command combined with find - to return back only directories - and xargs,

Code Block
find /path/to/hierarchy -type d | xargs -I{} chmod g+s {}