You could also use the UMASK variable to do what I suggest in the other thread; the first bit (normally untouched) is the SET mode for the file - this can be 0 (normal file or directory), sticky, GID, UID, etc. control.  By setting, for example 2000 it would change the first bit to "2" and then the "000" mask would translate to "666" or RW for Owner, RW for Group, and RW for anyone else.  https://wintelguy.com/umask-calc.pl Here's a good calculator that will calculate permissions for you as