From owner-freebsd-questions Wed Apr 7 2:34:58 1999 Delivered-To: freebsd-questions@freebsd.org Received: from volodya.prime.net.ua (volodya.prime.net.ua [195.64.229.17]) by hub.freebsd.org (Postfix) with ESMTP id E4878152CD for ; Wed, 7 Apr 1999 02:34:49 -0700 (PDT) (envelope-from andyo@prime.net.ua) Received: from prime.net.ua (localhost.prime.net.ua [127.0.0.1]) by volodya.prime.net.ua (8.8.8/8.8.8) with ESMTP id MAA00960; Wed, 7 Apr 1999 12:38:01 +0300 (EEST) (envelope-from andyo@prime.net.ua) Message-ID: <370B2777.7E213964@prime.net.ua> Date: Wed, 07 Apr 1999 12:38:00 +0300 From: "Andy V. Oleynik" Organization: M-Info X-Mailer: Mozilla 4.5 [en] (X11; I; FreeBSD 2.2.7-RELEASE i386) X-Accept-Language: ru, uk, en MIME-Version: 1.0 To: Greg Lehey Cc: Keith Anderson , questions@FreeBSD.ORG Subject: Re: C and permissions ? References: <19990407151537.I2142@lemis.com> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 8bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG umask.2 may be very usefull IMHO. 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". > > 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 -- WBW Andy V. Oleynik (When U work in virtual office U have good chance to obtain virtual money ö%-) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message