Thanks I finally did find a note in the C/C++ runtime manual that fopen
will give public *RWX.

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......

-----Original Message-----
[] On
Behalf Of Brian Lewis
Sent: Monday, July 17, 2006 5:50 PM
To: c400-l@xxxxxxxxxxxx
Subject: Re: [C400-L] fopen default authority

On Mon, 17 Jul 2006 17:38:45 -0400
"Crump, Mike" <Mike.Crump@xxxxxxxxxxxxxxxx> wrote:

I have created directories that have *PUBLIC *EXCLUDE and use an AUTL
list for the authorized users.  However, the file gets created with
*PUBLIC *RWX and no AUTL.  I'm assuming that the fopen runtime has a
default authority setup but can't seem to find that documented
Does it have a default *PUBLIC authority and can I change it so that
authority is pulled from the directory that the file is being created

Some documentation on fopen that I have says
    Any created files will have mode "S_IRUSR | S_IWUSR | S_IRGRP |
    | S_IROTH | S_IWOTH" (0666), as modified by the process' umask value
    (see umask(2)).

So maybe you want to use something other than fopen (I think open allows
to specify the permissions of created files) or set your umask to 022
whatever you prefer) before you create the file.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 by and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].