roy@phri.UUCP (04/03/87)
Can somebody explain to me why I can't get expire to run automatically from crontab? We're running 2.10.2 (I know, I know, we'll get 2.11 up eventually) on a VAX-11/750 under MtXinu 4.3BSD/NFS (although we're not actually running any nfs file systems yet). It all worked fine under 4.2, but with the new and improved cron, I'm sure there is something trivial I've set up wrong and when I find out what I'll probably kick myself. In the meantime I have to run expire manually once a week or run out of spool space. Anyway, in /usr/lib/crontab we have the following: % grep news /usr/lib/crontab 0 1 * * * news /usr/new/lib/news/daily 45 21,23,1,3,5 * * * news /usr/new/lib/news/nightly.q2h 30 2 * * 6 news /usr/new/lib/news/weekly 50 3 15 * * news /usr/new/lib/news/arbitron The first line is supposed to run a shell script which runs expire. The latter three (and other stuff in crontab) work fine, so it's not some generic cron problem. News is a valid uid: % grep news /etc/passwd news:RqRhg/7Lo5XJU:65:12:& System:/usr/spool/news:/bin/csh /usr/new/lib/news is a symlink to /usr/lib/news, which in turn is a symlink to /4.2usr/lib/news for historical reasons. The shell file looks like this: % cat /usr/lib/news/daily #!/bin/sh cd /usr/lib/news expire -e 7 -a net.sources,net.sources.bugs,net.sources.games,net.sources.mac,mod.amiga.sources,mod.mac.sources,mod.sources,mod.sources.doc,mod.sources.games,comp.sources.d,mod.amiga.binaries,mod.mac.binaries expire -e 7 -n all,all.all,all.all.all expire -e 2 -I -n mod.map If I manually do "/usr/new/lib/news/daily &" as root, it works fine. I don't see how it can be a permission problem because all the various files are owned or readable by news: % ls -ld /usr/new/lib/news lrwxrwxrwx 1 root 13 Feb 15 10:31 /usr/new/lib/news@ -> /usr/lib/news % ls -ld /usr/lib/news lrwxrwxrwx 1 root 16 Feb 3 15:44 /usr/lib/news@ -> /4.2usr/lib/news % ls -ldL /usr/lib/news drwxrwxr-x 4 news 1536 Apr 3 10:15 /usr/lib/news/ % ls -l /usr/lib/news/daily -rwxr-xr-x 1 news 305 Mar 15 08:47 /usr/lib/news/daily* So? What did I do wrong? -- Roy Smith, {allegra,cmcl2,philabs}!phri!roy System Administrator, Public Health Research Institute 455 First Avenue, New York, NY 10016 "you can't spell deoxyribonucleic without unix!"