From owner-freebsd-questions@FreeBSD.ORG Thu Sep 21 09:39:18 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E997316A407 for ; Thu, 21 Sep 2006 09:39:18 +0000 (UTC) (envelope-from gerard@seibercom.net) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.224]) by mx1.FreeBSD.org (Postfix) with ESMTP id B273443D68 for ; Thu, 21 Sep 2006 09:39:17 +0000 (GMT) (envelope-from gerard@seibercom.net) Received: by wx-out-0506.google.com with SMTP id i27so587394wxd for ; Thu, 21 Sep 2006 02:39:17 -0700 (PDT) Received: by 10.70.125.2 with SMTP id x2mr16826163wxc; Thu, 21 Sep 2006 02:39:16 -0700 (PDT) Received: from scorpio.seibercom.net ( [67.189.184.224]) by mx.gmail.com with ESMTP id h38sm195947wxd.2006.09.21.02.39.16; Thu, 21 Sep 2006 02:39:16 -0700 (PDT) Received: from scorpio.seibercom.net (localhost [127.0.0.1]) by scorpio.seibercom.net (Postfix) with ESMTP id BB2DBC287 for ; Thu, 21 Sep 2006 05:39:15 -0400 (EDT) Received: from [192.168.0.4] (boss.seibercom.net [192.168.0.4]) (Authenticated sender: gerard@scorpio.seibercom.net) by scorpio.seibercom.net (Postfix) with ESMTP id 30D89C170 for ; Thu, 21 Sep 2006 05:39:15 -0400 (EDT) Date: Thu, 21 Sep 2006 05:39:20 -0400 From: Gerard Seibert To: freebsd-questions@freebsd.org Organization: Seibercom In-Reply-To: <8944F1E6DB931D4681FF94706234BF71E95A@BB06.bolsabilbao.local> References: <45116D40.7020904@lidstrom.eu> <8944F1E6DB931D4681FF94706234BF71E95A@BB06.bolsabilbao.local> X-Face: "\j?x](l|]4p?-1Bf@!wN<&p=$.}^k-HgL}cJKbQZ3r#Ar]\%U(#6}'?<3s7%(%(gxJxxcR nSNPNr*/^~StawWU9KDJ-CT0k$f#@t2^K&BS_f|?ZV/.7Q Message-Id: <20060921053436.00EA.GERARD@seibercom.net> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Mailer: Becky! ver. 2.25 [en] Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: ClamAV using ClamSMTP Subject: Re: Default file creation permissions X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-questions@freebsd.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2006 09:39:19 -0000 Aitor San Juan wrote: > I have a shell script whose execution is scheduled by CRON. The > command scheduled is of the form: >=20 > 50 23 * * 1-5 /apps/batch/cronjobs/bd_backup.sh > > /apps/batch/logs/bd_backup.log 2>&1 >=20 > This shell script runs under the id of root. The file permissions of > the log file created are 644 (owner: root, group: wheel). I'd like that > the file permissions of the log created be 600 (or 640 maximum). How > could I accomplish this? This is probably related to "umask", but I > don't dare changing anything in case that change could affect some > other security configuration as a side effect. >=20 > What would you recommend? I have a few shell scripts that are run from CRON also. To accomplish what you want, I have 'chmod' and 'chown' commands in the scripts. Perhaps you might be able to incorporate something like that into yours. --=20 Gerard "Health experts in Europe now say one carrot a day can keep you free= of colon cancer. You know, I just hope they mean you eat it."