Here I figured that using "chgrp -R" resets the setuid bits on my binaries; which causes quite some grieve for our application.
Still, I have to run two commands to ensure that all things belong to a certain user; and that all things have "g+w" on them.
I think "most controlled" way of getting to that:
# group: root
# group: whatever
sed s/'^# group: root'/'#group: nobody'/g
You can use
sed similarly to the following examples:
echo 'group::?-?' | sed 's/\(^group::.\).\(.\)/\1w\2/' # gives group::?w? echo '#group:root' | sed 's/\(^#group:\).*/\1whatever/' # gives #group:whatever