Hello,

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.

That's true, that's what the umask does. However, that won't help you assign an authorization list to the file!

I'm a bit puzzled by the whole thing, since this is the C400-L mailing list, I assume you're writing your code in C? On the other hand, the code you posted earlier appeared to be in RPG. But, if you're doing this in RPG, why would you ask it on the C mailing list? That doesn't make sense. So I'm puzzled.

In C, the number 077 is octal. You know that because it starts with a leading zero. However, RPG has no notion of octal, so you have to convert it to decimal.

There's a umask() API that you can call to set your umask value.

My recommendation is that you set the umask to 077, so that only the owner has access, and then use the CHGAUT CL command to give it the appropriate permissions, including assigning the AUTL.

If you'd like sample code, please either reply here and ask for C sample code, or reply to the RPG400-L mailing list and ask for RPG sample code.


This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2019 by midrange.com 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].