From owner-freebsd-questions Mon Jan 27 16:47:46 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 EC03B37B401 for ; Mon, 27 Jan 2003 16:47:44 -0800 (PST) Received: from mail.destar.net (240-7-237-24-cable.anchorageak.net [24.237.7.240]) by mx1.FreeBSD.org (Postfix) with SMTP id E8A5B43F3F for ; Mon, 27 Jan 2003 16:47:43 -0800 (PST) (envelope-from jonr@destar.net) Received: (qmail 93046 invoked by uid 5000); 28 Jan 2003 00:48:36 -0000 Received: from unknown (HELO ?192.168.1.100?) (192.168.1.1) by 192.168.1.20 with SMTP; 28 Jan 2003 00:48:36 -0000 Subject: chown and chmod using crontab? From: Jon Reynolds To: FreeBSD Questions List Content-Type: text/plain Organization: Message-Id: <1043714644.1895.35.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.1 Date: 27 Jan 2003 15:44:05 -0900 Content-Transfer-Encoding: 7bit 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 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