From owner-freebsd-questions Wed Apr 7 6:15:18 1999 Delivered-To: freebsd-questions@freebsd.org Received: from alpha.comkey.com.au (alpha.comkey.com.au [203.9.152.215]) by hub.freebsd.org (Postfix) with SMTP id 57266157CC for ; Wed, 7 Apr 1999 06:14:50 -0700 (PDT) (envelope-from gjb@comkey.com.au) Received: (qmail 15797 invoked by uid 1001); 7 Apr 1999 12:53:03 -0000 Message-ID: <19990407125303.15796.qmail@alpha.comkey.com.au> X-Posted-By: GBA-Post 1.04 06-Feb-1999 X-PGP-Fingerprint: 5A91 6942 8CEA 9DAB B95B C249 1CE1 493B 2B5A CE30 Date: Wed, 07 Apr 1999 22:53:02 +1000 From: Greg Black To: Keith Anderson Cc: questions@FreeBSD.ORG Subject: Re: C and permissions ? References: In-reply-to: of Wed, 07 Apr 1999 15:36:54 +1000 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > 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. If you're talking about the permissions at the time of creation of the files, read the man pages for umask(2) and open(2). If you want to fix permissions on existing files, then you'll need chmod(2). -- Greg Black To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message