Is there a way to set special permissions on files and directories during its creation using umask or some other command ?
i.e if I set umask to 0000 , the file permissions will become 0666 and for directories it will be 0777 . In any case , default special permissions are not set .
No, it is not possible to set special permissions with umask.
Quoting the Arch Wiki: umask:
Use
chmod
to set gid and uid bits.