From owner-freebsd-questions Mon Jan 27 17: 0: 0 2003 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 28FFC37B401 for ; Mon, 27 Jan 2003 16:59:59 -0800 (PST) Received: from cypress.adhesivemedia.com (cypress.adhesivemedia.com [207.202.159.72]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0F53A43FA3 for ; Mon, 27 Jan 2003 16:59:57 -0800 (PST) (envelope-from philip@adhesivemedia.com) Received: from cypress.adhesivemedia.com (localhost [127.0.0.1]) by cypress.adhesivemedia.com (8.12.3/8.12.3) with ESMTP id h0S0xpSc044895; Mon, 27 Jan 2003 16:59:51 -0800 (PST) (envelope-from philip@adhesivemedia.com) Received: from localhost (philip@localhost) by cypress.adhesivemedia.com (8.12.3/8.12.3/Submit) with ESMTP id h0S0xpYW044892; Mon, 27 Jan 2003 16:59:51 -0800 (PST) X-Authentication-Warning: cypress.adhesivemedia.com: philip owned process doing -bs Date: Mon, 27 Jan 2003 16:59:51 -0800 (PST) From: Philip Hallstrom To: Jon Reynolds Cc: FreeBSD Questions List Subject: Re: chown and chmod using crontab? In-Reply-To: <1043714644.1895.35.camel@localhost.localdomain> Message-ID: <20030127165915.P44871-100000@cypress.adhesivemedia.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Try using the full paths... /bin/chmod and /usr/sbin/chown On 27 Jan 2003, Jon Reynolds wrote: > I have a directory that 2 different groups have access to. When one > group writes to the folder it retains the permissions of that group. I > need the permissions to change to the permissions of the directory. > > I thought I could add a crontab in and run a little script every 1 > minute to set the correct permissions. The script does what it should > when ran by the cmdline but not when I try to run it from the crontab. > > Is it not possible to run chmod and chown on a folder by using a > crontab? > > The entry into my /etc/crontab file looks like this: > > 0 * * * root /bin/fixperms > > My fixperms file looks like this: > > #!/bin/sh > > chmod -R 777 /usr/local/ServerFiles > chown -R staff /usr/local/ServerFiles > > Am I doing this right? > > Jon > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message