I give a directory the setgid bit. Then inside that directory I create another directory, and I want it to also have the setgid bit. I have tried something like umask 6002, but it says "octal number out of range." Is there a way to do this?
I give a directory the setgid bit. Then inside that directory I create another directory, and I want it to also have the setgid bit. I have tried something like umask 6002, but it says "octal number out of range." Is there a way to do this?
By default, it does that. The newly created folders in a directory which has SGID will have the same permission and group ownership:
a) Use
cp -R
instead ofmv
b) Use
find ./path/ -type d -exec chmod g+rwxs {} \;
aftermv