03-15-07 06:25 AM
On Mar 14, 3:20 pm, gaze...@xmission.xmission.com (Kenny McCormack)
wrote:
> In article <et8pj0$7p...@daniel-new.mch.sbs.de>,
> Rainer Temme <Rainer_Te...@nospam.hotmail_dot_com> wrote:
>
>
>
>
>
> Really, the best way to solve this problem is to assume nothing about
> umask and the associated apparatus. Instead, create the file, then use
> chmod() to change it to what you want it to be.
Alternately, before open()ing the file, make an explicit call to
umask(2) to override the inherited umask with a umask of 0.
I.e.
mode_t old_umask;
old_umask = umask(0);
fdLog = open (logCurDate. c_str(),O_WRONLY|O_APPEND|O_CREAT,S_IRWX
U|
S_IRWXG|S_IRWXO);
HTH
--
Lew
[ Post a follow-up to this message ]
|