Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Apr 1999 19:13:28 +0930
From:      Greg Lehey <grog@lemis.com>
To:        "Andy V. Oleynik" <andyo@prime.net.ua>
Cc:        Keith Anderson <keith@apcs.com.au>, questions@FreeBSD.ORG
Subject:   Re: C and permissions ?
Message-ID:  <19990407191328.T2142@lemis.com>
In-Reply-To: <370B2777.7E213964@prime.net.ua>; from Andy V. Oleynik on Wed, Apr 07, 1999 at 12:38:00PM %2B0300
References:  <Pine.BSF.3.96.990407153230.18821A-100000@localhost> <19990407151537.I2142@lemis.com> <370B2777.7E213964@prime.net.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday,  7 April 1999 at 12:38:00 +0300, Andy V. Oleynik wrote:
> Greg Lehey wrote:
>
>> On Wednesday,  7 April 1999 at 15:36:54 +1000, Keith Anderson wrote:
>>>
>>> I wrote some C programs that make files but need to set the permissions
>>> inside the program, so the created files have the correct rw permission.
>>>
>>> Is there an include to handle file permissions.
>>
>> I think you mean a system call.  Yes, there's a system call "chmod".
>> Try "man 2 chmod".
>
> umask.2  may be very usefull IMHO.

Well, yes, but you can normally set your umask from the shell, and it
wasn't really the original question.

Greg
--
When replying to this message, please copy the original recipients.
For more information, see http://www.lemis.com/questions.html
See complete headers for address, home page and phone numbers
finger grog@lemis.com for PGP public key


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990407191328.T2142>