umask

This command is part of the TclX package. (Also available as single package under https://fossil.sowaswie.de/umask/index )

umask ?octalMask?

Gets and sets the POSIX file creation permissions mask. Gets the current value if octalMask is omitted, sets it if octalMask is given. Will affect the open and file mkdir commands, plus operations by subprocesses started with exec (it is an inheritable property that is cloned when a new process is created).