Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!sun-barr!apple!coherent!dplatt From: dplatt@coherent.com (Dave Platt) Newsgroups: news.software.b Subject: Re: sort problem while running expire -r Keywords: sort Sun temp /tmp Message-ID: <34944@coherent.coherent.com> Date: 28 Sep 89 22:09:56 GMT References: <34850@coherent.coherent.com> Reply-To: dplatt@coherent.com (Dave Platt) Distribution: news Organization: Coherent Thought Inc., Palo Alto CA Lines: 44 Well, I found the problem. Pilot error on our end. I had tried running sort manually, and from within expire, with the options "-T/usr/tmp" and "-T /usr/tmp". Neither seemed to work. I received some messages from people who suggested that this option _should_ work... and, in fact, that I might not even need it, since at least one version of sort (SunOS 4.0.x) tries to place its files in /usr/tmp, and switches over to /tmp only if it can't put them into /usr/tmp. I then tried running the sort again, trying the option again... and this time it worked! Why? Well, the first times I had tried it, I was running suid=news; the time it worked, I was running suid=myself. A little investigation showed that the /usr/tmp directory on our server machine had somehow been set up with owner=root, group=cti (our "software developer" group), and permissions=770. As a result, sort couldn't write there when run suid=news; it dropped back 10 and punted the files into /tmp without ever informing me of the fact. I changed the permissions on this directory to 777, recompiled expire so that it specified "sort -T /usr/tmp", and rebuilt my history file. Lo and behold, it worked perfectly... the scratch files were placed in /usr/tmp and the sort didn't overload our root partition. Thanks to everybody who wrote in with suggestions. I received two notes suggesting that I try "-T /usr/tmp" rather than "-T/usr/tmp" (I had, and had neglected to mention so in my posting), one saying "Everybody I know simply symlinks /tmp over to /usr/tmp", one saying "I symlinked it and it seems to work OK", and one urging me _not_ to symlink, because I might get burned if I ever needed temp space when running single-user with the /usr filesystem dismounted... but instead to set up a separate partition and mount /tmp onto it. Again, thank you all! -- Dave Platt VOICE: (415) 493-8805 UUCP: ...!{ames,apple,uunet}!coherent!dplatt DOMAIN: dplatt@coherent.com INTERNET: coherent!dplatt@ames.arpa, ...@uunet.uu.net USNAIL: Coherent Thought Inc. 3350 West Bayshore #205 Palo Alto CA 94303