From owner-freebsd-questions Sat Apr 1 19:27:15 2000 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 61E4837B6AB for ; Sat, 1 Apr 2000 19:27:01 -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.9.3) id WAA29968; Sat, 1 Apr 2000 22:26:58 -0500 (EST) (envelope-from cjc) Date: Sat, 1 Apr 2000 22:26:57 -0500 From: "Crist J. Clark" To: Ben Williams Cc: "Crist J. Clark" , FreeBSD Questions Subject: Re: symlinking /var/mail to /usr/mail Message-ID: <20000401222657.B29675@cc942873-a.ewndsr1.nj.home.com> Reply-To: cjclark@home.com References: <20000401124656.B28346@cc942873-a.ewndsr1.nj.home.com> <3919.000401@home.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <3919.000401@home.com>; from williamsl@home.com on Sat, Apr 01, 2000 at 10:03:47PM -0500 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sat, Apr 01, 2000 at 10:03:47PM -0500, Ben Williams wrote: > Quoting Crist J. Clark Saturday, April 01, 2000 > CJC> On Sat, Apr 01, 2000 at 07:08:23AM -0600, Chris Byrnes wrote: > >> I am running out of space on /var, so I'd like to remove /var/mail, > >> create /usr/mail, and create a symlink so /var/mail forwards to > >> /usr/mail. > >> > >> I know how to do that and stuff, but I'm not sure what permissions /usr/mail > >> should have and who should own it. > >> > >> Advice? > > CJC> Well, I think giving /usr/mail the same permissions and ownership as > CJC> /var/mail would be a pretty safe way to go. In my case I would, > > CJC> # mkdir /usr/mail > CJC> # chown root.mail /usr/mail > CJC> # chmod 775 /usr/mail > CJC> # kill `head -1 /var/run/sendmail.pid` > CJC> # tar cf - -C /var/mail . | tar xf - -C /usr/mail > CJC> # mv /var/mail /var/mail.old # just to be safe > CJC> # ln -s usr/mail /var/mail > CJC> # /usr/sbin/sendmail -bd -q30m > > CJC> And I think that would do it. Remove /var/mail.old when you verify > CJC> everything got copied and is working fine. > > > Would it be better to change this somewhat: > mkdir > ch(own/mod) > -- and now -stop- sendmail to avoid loosing data as tar runs -- > --(will -HUP kill sendmail or cause it to re-read its config files?)-- On a HUP, it does die and also reads the config file. The present sendmail process dies and a new sendmail is spawned that reads the new config files. That's why I sent sendmail a TERM in the above example. However, thinking about it more, sendmail _loves_ to fork off copies of itself. After killing the parent sendmail as shown above, check to make sure there are no children still about. Wait for them to finish whatever they are doing before continuing. > mv > ln -s /usr/mail /var/mail # watch that first / ;-) Yep. I saw that typo after I sent the mail. That first slash is important. > restart sendmail -- Crist J. Clark cjclark@home.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message