StgCreateDocfile file permissions

Hello!

How can I change default permissions of file created by StgCreateDocfile(…) function on Linux?
I can change permissions of file after creating, but… does it possible to change default permissions?
BTW, umask doesn’t work for files created by this function…

Thank you!