From owner-freebsd-questions Wed Apr 7 2:45:36 1999 Delivered-To: freebsd-questions@freebsd.org Received: from allegro.lemis.com (allegro.lemis.com [192.109.197.134]) by hub.freebsd.org (Postfix) with ESMTP id 09D3C1577E for ; Wed, 7 Apr 1999 02:45:31 -0700 (PDT) (envelope-from grog@freebie.lemis.com) Received: from freebie.lemis.com (freebie.lemis.com [192.109.197.137]) by allegro.lemis.com (8.9.1/8.9.0) with ESMTP id TAA13315; Wed, 7 Apr 1999 19:13:30 +0930 (CST) Received: (from grog@localhost) by freebie.lemis.com (8.9.3/8.9.0) id TAA17980; Wed, 7 Apr 1999 19:13:28 +0930 (CST) Message-ID: <19990407191328.T2142@lemis.com> Date: Wed, 7 Apr 1999 19:13:28 +0930 From: Greg Lehey To: "Andy V. Oleynik" Cc: Keith Anderson , questions@FreeBSD.ORG Subject: Re: C and permissions ? References: <19990407151537.I2142@lemis.com> <370B2777.7E213964@prime.net.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.93.2i In-Reply-To: <370B2777.7E213964@prime.net.ua>; from Andy V. Oleynik on Wed, Apr 07, 1999 at 12:38:00PM +0300 WWW-Home-Page: http://www.lemis.com/~grog Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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