From owner-freebsd-questions Wed Feb 24 21: 5:43 1999 Delivered-To: freebsd-questions@freebsd.org Received: from cc942873-a.ewndsr1.nj.home.com (cc942873-a.ewndsr1.nj.home.com [24.2.89.207]) by hub.freebsd.org (Postfix) with ESMTP id CB2BF14D91 for ; Wed, 24 Feb 1999 21:02:18 -0800 (PST) (envelope-from cjc@cc942873-a.ewndsr1.nj.home.com) Received: (from cjc@localhost) by cc942873-a.ewndsr1.nj.home.com (8.9.3/8.8.8) id AAA02132; Thu, 25 Feb 1999 00:11:02 -0500 (EST) (envelope-from cjc) From: "Crist J. Clark" Message-Id: <199902250511.AAA02132@cc942873-a.ewndsr1.nj.home.com> Subject: Re: Broken "at" ? In-Reply-To: <19990224191407.B19315@winternet.com> from Nathan Ahlstrom at "Feb 24, 99 07:14:07 pm" To: nrahlstr@winternet.com (Nathan Ahlstrom) Date: Thu, 25 Feb 1999 00:11:02 -0500 (EST) Cc: data@dreamhaven.net, freebsd-questions@FreeBSD.org Reply-To: cjclark@home.com X-Mailer: ELM [version 2.4ME+ PL40 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Nathan Ahlstrom wrote, > Bryce Newall wrote: > > Greetings! > > > > I have a small problem. Somehow, in the process of swapping out some hard > > drives, I seem to have broken the "at" command. Some of my users have > > griped about it, because they (like me, actually) use it to send > > themselves reminder notes, and it's a heck of a lot easier than using cron > > to set up a one-time job and then remembering to delete the cron job > > again. Whenever something tries to run with atrun, I get this in my logs: > > > > Feb 24 00:30:00 dreamhaven atrun[19405]: cannot create output file: > > Permission denied > > > > I have no idea where "at" is trying to create its output file. My best > > guess is /var/at, and I suspect there's a permissions problem somewhere, > > but I don't know what the permissions should be. Here's what I have: > > > > [61]root@dreamhaven:/var # ls -d at > > drwxr-xr-x 4 root wheel 512 Feb 8 11:24 at/ > > [62]root@dreamhaven:/var # cd at > > [63]root@dreamhaven:/var/at # ls > > total 2 > > -rw-r--r-- 1 root wheel 0 Dec 25 01:15 at.deny > > drwxr-xr-x 2 root wheel 512 Feb 24 00:26 jobs/ > > drwxr-xr-x 2 root wheel 512 Dec 25 01:15 spool/ > > > > I've tried changing the permissions on the "jobs" and "spool" directories > > to 777, but to no avail. If anyone has a suggestion, I'd sure love to > > hear it! It's probably just something stupid that I've overlooked. > > portage% ls -al /var/at > total 4 > drwxr-xr-x 4 root wheel 512 Oct 5 1997 . > drwxr-xr-x 18 root wheel 512 Dec 18 18:10 .. > drwxr-xr-x 2 daemon wheel 512 Feb 14 22:10 jobs > drwxr-xr-x 2 daemon wheel 512 Feb 14 22:15 spool > portage% > > Mine are owned by the daemon user. I don't think that should matter, files are written to jobs as the invoking user which implies root privilege plus, [162:/var/at] ls -l `which at` -r-sr-xr-x 4 root bin 20480 Jul 22 1998 /usr/bin/at And you never said 'at' didn't work. As for permissions at job execution, the atrun is started by cron in /etc/crontab. The line is, #minute hour mday month wday who command # */5 * * * * root /usr/libexec/atrun Correct? I must say I'm a bit confused myself. I wanted to do some test 'at's so I loaded some up, but none of them ran. I ran /usr/libexec/atrun by hand (as root) however, and all of the jobs that should have, ran. I was playing with the clock earlier... wonder if I messed up cron... but cron is running, [101:/var/at]# date Thu Feb 25 00:07:49 EST 1999 [102:/var/at]# ps aux | grep cron root 119 0.0 0.3 332 440 ?? Is Tue07PM 0:00.22 cron [103:/var/at]# atq Date Owner Queue Job# 00:00:00 02/25/99 cjc c 10 [104:/var/at]# /usr/libexec/atrun [105:/var/at]# atq [106:/var/at]# date Thu Feb 25 00:08:18 EST 1999 Well, I'll SIGHUP cron and see if that gets it in gear... -- Crist J. Clark cjclark@home.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message