Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Apr 1998 00:21:41 -0400 (EDT)
From:      CyberPeasant <djv@bedford.net>
To:        gurab@lineone.net
Cc:        djv@bedford.net, freebsd-questions@FreeBSD.ORG
Subject:   Re: /usr/var
Message-ID:  <199804280421.AAA04511@pollux.loco.net>
In-Reply-To: <004001bd723c$e0ea5620$0400a8c0@speedy> from "Chris R." at "Apr 28, 98 01:30:37 am"

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> 
> >
> >Ouch. This would be a last resort, in my humble opinion. The best
> >places for /tmp and /var are on a separate partion(s). If one partion
> >is available then pointing /tmp to /var/tmp makes sense.
> 
> why is that a better option?  (excuse my ignorance)

THe idea is to keep the /usr partition quiet, with nothing writing
to it, except for software updates. Then /usr can me mounted readonly
for normal use. Thus rogue kernels, system crashes due to power outages,
coffe spilt on keyboard, etc, will not corrupt /usr. Backup demands
are eliminated, except for one copy. It also keeps evil people
from changing programs.

> >
> >> # mkdir /usr/var
> >> # cd /var
> >> # tar cf - . | (cd /usr/var; tar xf - )
> >> # cd /
> >> # rm -rf /var
> >
> >Then you should do:
> >
> >  # ln -s /usr/var /var
> >>
> 
> oops, sorry my typing omition there - that is what I did, as per the
> book.

Hmm. Check permissions all around.  Can you create a file there as
root? as a user? 

> >> # mkdir /usr/tmp
> >> # rm -rf /tmp
> >> # ln -s /usr/tmp /tmp

Again, look at permissions. The permissions on /usr/tmp should be 01777,
shown as drwxrwxrwt in a ls -ld /usr/tmp

> and that too - but I still get the messages :-(
> 
> >Just like this, in other words.
> >
> >A small question, how did /var get so full?
> >
> >Dave
> >--
> 
> I use the Freebsd machine as an FTP server for a small windows 95 / NT
> network - I just uploaded too many files I guess and it started
> returning the lack of space errors and refusing any more files.
> 

Ah! It might be simpler to just move the /var/ftp directory. (Direct attack
on the presumed villain.) If /home has space, /home/ftp could be
a win. Other Unixes start it off there. Besides copying the stuff with
the tar pipes, you will need to change user ftp's home directory to
match (with vipw or chpass).

Oh, on those pipes, it is often prudent to include tar's -p switch, which
preserves permissions and ownerships.

dave
-- 
                <----. mailto/pgpfinger: djv@bedford.net
                <----|===================================
                <----'        Crathva fxrjre

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199804280421.AAA04511>