On Wed, 19 Jul 2006 08:59:40 -0400 "Crump, Mike" <Mike.Crump@xxxxxxxxxxxxxxxx> wrote:
Unfortunately I am not an expert of the C or run time API environment. We may have to revert to using open instead but I'm wondering about the umask 022 that you referenced. You will have to assume that I don't have a clue as to what umask is......
Your umask determines the default permissions of files you create. I think the creation mode is 0666 & ~mask. So, for example, if you create a file under umask 022, its mode would be 0666 & ~022 = 0644, meaning owner can read and write, group can read, and others can read. You might be wanting umask 077. 0666 & ~077 = 600, meaning that owner can read and write but nobody else can do anything to the file. You might just try setting your umask to 077 (that's octal) before doing the fopen to see if the result is what you wanted.