Linux-Setup Digest #836, Volume #19              Mon, 16 Oct 00 03:13:07 EDT

Contents:
  Re: A new directory hierarchy standard - need opinions ([EMAIL PROTECTED])
  Re: Netscape uses cache more than its quota? ("Kousik Nandy")
  Re: I need ip port forwarding help ("Micer")
  Re: Bizarre shell problem. Please help (John)
  Re: VMware on Linux (John)
  Re: Red Hat 6.2 Permissions (John)
  Re: Cloning RH HDD (John)
  Redhat 7.0 and Cable Internet ("exarch")
  Re: Linux Partition Link Corrupted (Eric)

----------------------------------------------------------------------------

From: [EMAIL PROTECTED]
Crossposted-To: 
comp.os.linux.development.system,comp.os.linux.admin,comp.os.linux.networking
Subject: Re: A new directory hierarchy standard - need opinions
Date: Mon, 16 Oct 2000 06:14:31 -0000

In comp.os.linux.development.system Todd Knarr <[EMAIL PROTECTED]> wrote:

| In comp.os.linux.development.system <[EMAIL PROTECTED]> 
|[EMAIL PROTECTED] wrote:
|> When a package has more than a few executeables, or any libraries or
|> data it needs to access, I prefer having the whole package "encapsulated"
|> where I can see where it is, how much space it all takes, remove it all
|> if I want, or tarball it to another machine to run it there.
|
| For viewing, that's what I consider package-management to be for: hold
| all the details on the files in a package no matter where they are on the
| machine. Integrating packages into the regular system also forces me to
| deal with things like library-name conflicts up-front, not later on when
| someone finally decides to use the wrong combination of packages at the
| same time and something blows up.

That has been promoted as one of the features of package management programs.
OTOH, those package management programs have caused me more grief than the
supposed benefit they offer.  I've had packages that are incomplete with
the uninstall.  And the dependencies get all fouled up when you do have to
install a new version of some package not yet in that package format that
other things depend on (such as the kernel).


|> The disadvantage is that a package may need to have some files shared
|> between many machines and some files separate per machine.  Perhaps
|> the best solution would be /usr/opt and /var/opt.  Those can either or
|> both be mounted as distinct filesystems as desired.
|
| I usually like /var/{package}, much like /etc/{package} for configuration.
| Why add another level to that directory tree for the same purpose unless
| you need to to avoid name conflicts? Same with /etc. I look at it as being
| that /var and /etc are where files that'll need to be modified by the
| admins go, or where configuration files go, regardless of package. The
| /|/usr|/usr/local division is for stuff related to package management
| issues and whether something's needed during start-up, not writeability
| or access.

That would end up mingling what normally goes in var (things that are not
package names) with package names.  What if I name my package "passwd"?
Do I get to have it in /etc/passwd?

How about instead:  /var/opt/{packagename} and /etc/opt/{packagename} ?


|> Maybe.  See above for /var/opt.  But I'll extrapolate into /usr/local/opt.
|> I usually leave /usr mounted read-only and /usr/local mounted writeable.
|
| For normal things, read-only mounting doesn't matter because nobody but
| root should have write access even to /usr/local, let alone /usr ( modulo
| a few exceptions handled via SUID/SGID and proper ownerships ). Any work
| on packages like you describe I do under a regular user, working under
| their own home directory, _then_ port it to system directories when it's
| done via a regular install to confirm that it works right. Keeps down the
| chance of hosing something and forces me to deal with locations and
| permissions without depending on root-specific things.

If nobody but root has write access, then I'd have to be root far more
often than I am now, and then it's even more dangerous, exposing the
system to even more typos.  I like to minimize being root.  Users in
group "bin" get to write in /usr/* (when mounted r/w) and /usr/local/*
and there are also cases where /usr is network mounted (and then even
more likely to be read-only).

-- 
| Phil Howard - KA9WGN | My current websites: linuxhomepage.com, ham.org
| phil  (at)  ipal.net +----------------------------------------------------
| Dallas - Texas - USA | [EMAIL PROTECTED]

------------------------------

From: "Kousik Nandy" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.misc
Subject: Re: Netscape uses cache more than its quota?
Date: Mon, 16 Oct 2000 11:41:26 +0530

"Mike Castle" <[EMAIL PROTECTED]> wrote:

> Some Unix tips:
> 

Gee thanks!

Kousik :-)

------------------------------

From: "Micer" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.misc
Subject: Re: I need ip port forwarding help
Date: Sun, 15 Oct 2000 23:20:32 -0700

This is a multi-part message in MIME format.

=======_NextPart_000_0017_01C036FE.84053220
Content-Type: text/plain;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Don't know what your doing wrong, but you have "echo 1 > =
/proc/sys/net/ipv4/ip_forward " as a good start to getting it going. =
Here is what I do and it works perfectly fine:


LOOPBACK_IF=3D"lo"
ANYWHERE=3D"any/0"
INTERNAL_IF=3D"eth0"
EXTERNAL_IF=3D"ppp0"
echo 1 > /proc/sys/net/ipv4/ip_forward=20
ipchains -P input      DENY=20
ipchains -P output    REJECT=20
ipchains -P forward  REJECT=20
ipchains  -A  input   -i  $LOOPBACK_IF  -j  ACCEPT
ipchains  -A  output -i  $LOOPBACK_IF  -j  ACCEPT
ipchains  -A  forward  -i  $INTNET  -d $ANYWHERE  -j  MASQ
ipchains  -A  output  -i $EXTERNAL_IF  -j  ACCEPT
ipchains  -A  input    -i $EXTERNAL_IF  -j  ACCEPT
ipchains  -A  output  -i $INTERNAL_IF  -j  ACCEPT
ipchains  -A  input    -i $INTERNAL_IF  -j  ACCEPT


Normally you wouldn't NAT all packets out to the internet, however I =
just use the above for testing to ensure NAT is working properly. =
Packets get forwarded no problem. I set my default gateway on an NT or =
W95 client to point to the Linux box and I run HTTP, e-mail, NNTP news, =
etc, etc. No problems. Basically I open up everything and turn =
forwarding on with NAT (soruce addresses replaced with the Linux box =
address as a source). Note that I am using ppp0 as an external interface =
because I only have a dial-up connection to the internet.

Micer


  "craig" <[EMAIL PROTECTED]> wrote in message =
news:[EMAIL PROTECTED]...
   =20
  C H wrote:=20

    =20
    I am trying to forward ports through my firewall and it does not =
want to work. I am hoping one of=20
    you Linux gurus will have the answer.=20
     =20
    I am using Redhat 6.2 with kernel 2.1.14=20

    the rc.local file looks like this:=20

    #!/bin/sh=20
    #=20
    # This script will be executed *after* all the other init scripts.=20
    # You can put your own initialization stuff in here if you don't=20
    # want to do the full Sys V style init stuff.=20
    echo 1 > /proc/sys/net/ipv4/ip_forward=20

    echo "Setting DENY defaults... "=20
    ipchains -P input   DENY=20
    ipchains -P output  REJECT=20
    ipchains -P forward REJECT=20

    EXTERNAL_INTERFACE=3D"eth1"=20
    ANYWHERE=3D"0.0.0.0/0"=20
    LAN_INTERFACE_1=3D"eth0"=20
     =20

    ##############DirectX port forwarded=20
    ipmasqadm autofw -A -v -r tcp 47624 47624 -h 192.168.200.3=20
    ipmasqadm autofw -A -v -r udp 47624 47624 -h 192.168.200.3=20
     =20

    ###############Jedi Knight=20
    ipmasqadm autofw -A -v -r tcp 28800 28912 -h 192.168.200.3=20
    ipmasqadm autofw -A -v -r udp 28800 28912 -h 192.168.200.3=20

    ipmasqadm autofw -A -v -r tcp 2300 2400 -h 192.168.200.3=20
    ipmasqadm autofw -A -v -r udp 2300 2400 -h 192.168.200.3=20
     =20

    echo "Masquerading Internal hosts... "=20
    ipchains -A forward -j MASQ -s 192.168.200.0/24 -d 0.0.0.0/0=20
     =20

    When it runs, the output looks like this:=20

    Setting DENY defaults...=20
    Setting masquerade defaults...=20
    Adding autofwd tcp ports 47624 - 47624 to fixed host 192.168.200.3 U =

    Adding autofwd udp ports 47624 - 47624 to fixed host 192.168.200.3 U =

    Adding autofwd tcp ports 28800 - 28912 to fixed host 192.168.200.3 U =

    Adding autofwd udp ports 28800 - 28912 to fixed host 192.168.200.3 U =

    Adding autofwd tcp ports 2300 - 2400 to fixed host 192.168.200.3 U=20
    Adding autofwd udp ports 2300 - 2400 to fixed host 192.168.200.3 U=20
    Adding autofwd tcp ports 6699 - 6699 to fixed host 192.168.200.3 U=20
    Masquerading Internal hosts...=20

    It acts like it is working, but my sniffer on the local network =
reveals output packets on ports in the 28800 and 2300 range, but none =
coming back.=20

    AAARGH! What am i doing wrong?


=======_NextPart_000_0017_01C036FE.84053220
Content-Type: text/html;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4134.600" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV>Don't know what your doing wrong, but you have "echo 1 &gt;=20
/proc/sys/net/ipv4/ip_forward " as a good start to getting it going. =
Here is=20
what I do and it works perfectly fine:</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV>LOOPBACK_IF=3D"lo"</DIV>
<DIV>ANYWHERE=3D"any/0"</DIV>
<DIV>INTERNAL_IF=3D"eth0"</DIV>
<DIV>EXTERNAL_IF=3D"ppp0"</DIV>
<DIV>echo 1 &gt; /proc/sys/net/ipv4/ip_forward </DIV>
<DIV>ipchains -P input&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DENY <BR>ipchains =
-P=20
output&nbsp;&nbsp;&nbsp; REJECT <BR>ipchains -P forward&nbsp; REJECT =
</DIV>
<DIV>ipchains &nbsp;-A &nbsp;input&nbsp;&nbsp;&nbsp;-i&nbsp; =
$LOOPBACK_IF&nbsp;=20
-j&nbsp; ACCEPT</DIV>
<DIV>ipchains &nbsp;-A&nbsp; output -i&nbsp; $LOOPBACK_IF &nbsp;-j=20
&nbsp;ACCEPT</DIV>
<DIV>ipchains&nbsp; -A&nbsp; forward&nbsp; -i&nbsp; $INTNET&nbsp;=20
-d&nbsp;$ANYWHERE &nbsp;-j &nbsp;MASQ</DIV>
<DIV>ipchains&nbsp; -A&nbsp; output&nbsp; -i $EXTERNAL_IF&nbsp; -j&nbsp; =

ACCEPT</DIV>ipchains&nbsp; -A&nbsp; input&nbsp;&nbsp;&nbsp;&nbsp;-i=20
$EXTERNAL_IF&nbsp; -j&nbsp; ACCEPT
<DIV>ipchains&nbsp; -A&nbsp; output&nbsp; -i $INTERNAL_IF&nbsp; -j&nbsp; =

ACCEPT</DIV>
<DIV>ipchains&nbsp; -A&nbsp; input&nbsp;&nbsp;&nbsp; -i =
$INTERNAL_IF&nbsp;=20
-j&nbsp; ACCEPT</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>Normally you wouldn't NAT all packets out to the internet, however =
I just=20
use the above for testing to ensure NAT is working properly. Packets get =

forwarded no problem. I set my default gateway on an NT or W95 client to =
point=20
to the Linux box and I run HTTP, e-mail, NNTP news, etc, etc. No =
problems.=20
Basically I open up everything and turn forwarding on with NAT (soruce =
addresses=20
replaced with the Linux box address as a source). Note that I am using =
ppp0 as=20
an external interface because I only have a dial-up connection to the=20
internet.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Micer</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV>"craig" &lt;<A=20
  href=3D"mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</A>&gt; =
wrote in=20
  message <A=20
  =
href=3D"news:[EMAIL PROTECTED]">news:39EA9364.9D36AD45@oresis.=
com</A>...</DIV>&nbsp;=20

  <P>C H wrote:=20
  <BLOCKQUOTE TYPE=3D"CITE"> <BR><FONT size=3D+2>I am trying to forward =
ports=20
    through my firewall and it does not want to work. I am hoping one =
of</FONT>=20
    <BR><FONT size=3D+2>you Linux gurus will have the answer.</FONT> =
<BR>&nbsp;=20
    <P><FONT size=3D+2>I am using Redhat 6.2 with kernel 2.1.14</FONT>=20
    <P><FONT size=3D+2>the rc.local file looks like this:</FONT>=20
    <P>#!/bin/sh <BR># <BR># This script will be executed *after* all =
the other=20
    init scripts. <BR># You can put your own initialization stuff in =
here if you=20
    don't <BR># want to do the full Sys V style init stuff. <BR>echo 1 =
&gt;=20
    /proc/sys/net/ipv4/ip_forward=20
    <P>echo "Setting DENY defaults... " <BR>ipchains -P =
input&nbsp;&nbsp; DENY=20
    <BR>ipchains -P output&nbsp; REJECT <BR>ipchains -P forward REJECT=20
    <P>EXTERNAL_INTERFACE=3D"eth1" <BR>ANYWHERE=3D"0.0.0.0/0"=20
    <BR>LAN_INTERFACE_1=3D"eth0" <BR>&nbsp;=20
    <P>##############DirectX port forwarded <BR>ipmasqadm autofw -A -v =
-r tcp=20
    47624 47624 -h 192.168.200.3 <BR>ipmasqadm autofw -A -v -r udp 47624 =
47624=20
    -h 192.168.200.3 <BR>&nbsp;=20
    <P>###############Jedi Knight <BR>ipmasqadm autofw -A -v -r tcp =
28800 28912=20
    -h 192.168.200.3 <BR>ipmasqadm autofw -A -v -r udp 28800 28912 -h=20
    192.168.200.3=20
    <P>ipmasqadm autofw -A -v -r tcp 2300 2400 -h 192.168.200.3 =
<BR>ipmasqadm=20
    autofw -A -v -r udp 2300 2400 -h 192.168.200.3 <BR>&nbsp;=20
    <P>echo "Masquerading Internal hosts... " <BR>ipchains -A forward -j =
MASQ -s=20
    192.168.200.0/24 -d 0.0.0.0/0 <BR>&nbsp;=20
    <P><FONT size=3D+2>When it runs, the output looks like this:</FONT>=20
    <P>Setting DENY defaults... <BR>Setting masquerade defaults... =
<BR>Adding=20
    autofwd tcp ports 47624 - 47624 to fixed host 192.168.200.3 U =
<BR>Adding=20
    autofwd udp ports 47624 - 47624 to fixed host 192.168.200.3 U =
<BR>Adding=20
    autofwd tcp ports 28800 - 28912 to fixed host 192.168.200.3 U =
<BR>Adding=20
    autofwd udp ports 28800 - 28912 to fixed host 192.168.200.3 U =
<BR>Adding=20
    autofwd tcp ports 2300 - 2400 to fixed host 192.168.200.3 U =
<BR>Adding=20
    autofwd udp ports 2300 - 2400 to fixed host 192.168.200.3 U =
<BR>Adding=20
    autofwd tcp ports 6699 - 6699 to fixed host 192.168.200.3 U =
<BR>Masquerading=20
    Internal hosts...=20
    <P><FONT size=3D+2>It acts like it is working, but my sniffer on the =
local=20
    network reveals output packets on ports in the 28800 and 2300 range, =
but=20
    none coming back.</FONT>=20
    <P><FONT size=3D+2>AAARGH! What am i doing=20
wrong?</FONT></P></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>

=======_NextPart_000_0017_01C036FE.84053220==


------------------------------

From: John <[EMAIL PROTECTED]>
Subject: Re: Bizarre shell problem. Please help
Date: 16 Oct 2000 13:32:36 +0800

Colin Watson <[EMAIL PROTECTED]> wrote:
> Servet Ahmet Cizmeli <[EMAIL PROTECTED]> wrote:
>>[root@seawifs etc]# /usr/local/matlab5/etc/lnx86/lmhostid
>>bash: /usr/local/matlab5/etc/lnx86/lmhostid: No such file or directory
>>
>>however the file exists with correct execution permissions
>>
>>[root@seawifs etc]# ls -l /usr/local/matlab5/etc/lnx86/lmhostid
>>-rwxr-xr-x   10 acizmeli users      219264 Oct 31  1997
>>/usr/local/matlab5/etc/lnx86/lmhostid
>>
>>I AM COMPLETELY STUCK. WHY WOULD THE SHELL NOT FIND THIS FILE TO RUN

> If it's a script, the first line of the file will start with the two
> characters '#!'. Check that the rest of that line points to an existing
> file.

Colin takes the prize. Pity he didn't offer evidence;-)

[summer@possum summer]$ gvim bin/noshell
[summer@possum summer]$ cat bin/noshell
#!/bin/MisshingShell
ls -l
 
[summer@possum summer]$ chmod +x bin/noshell
[summer@possum summer]$ bin/noshell
bash: bin/noshell: No such file or directory
[summer@possum summer]$


This looks to me just like the original error.



-- 

------------------------------

From: John <[EMAIL PROTECTED]>
Subject: Re: VMware on Linux
Date: 16 Oct 2000 13:40:11 +0800

Zebee Johnstone <[EMAIL PROTECTED]> wrote:
> In comp.os.linux.setup on Mon, 16 Oct 2000 17:34:15 +1300
> Loren Brookes <[EMAIL PROTECTED]> wrote:
>>
>>Okay, I was going to mention the raw disk option, but my point was that you
>>need to install your desired OS from scratch on the VM... plus personally I
>>think the flexibility loss associated with using a "raw disk",  takes from
>>the advantage of using a  *virtual*  machine.


> If you already have a dual boot machine, then taking up diskspace
> with yet another is silly.

> Being able to have linux in yuor windows OS and windows in your linux
> OS is very flexible.

> See  Configuring Dual/Multiboot Systems to Run with VMware for Linux
> on www.vmware.com

> They do note that it's tricky, and not for first time vmware users.


I was browsing the VMWare website the other day, and read through the
requirements and the virtual machine environment on offer.

It seems to me that few users would have virtual and real evironments
compatible enough to run the same install of win* on real and virtual machines,
unless they bought the hardware specifically to make it so.


However, I would expect that guests would perform better with raw disk acess.


-- 

------------------------------

From: John <[EMAIL PROTECTED]>
Subject: Re: Red Hat 6.2 Permissions
Date: 16 Oct 2000 13:45:33 +0800

stcccc <[EMAIL PROTECTED]> wrote:
> This is possibly a stupid question, but I have a directory /proc/6/fd 
> which I can not view, delete, or whatever even logged in as root.  Now as 
> I understand it, root is God, so why is it I can not look at this 
> directory?

If you deleted it, sure as eggs is eggs, you'd bugger something up.

What's running as pid 6 on your system?


-- 

------------------------------

From: John <[EMAIL PROTECTED]>
Subject: Re: Cloning RH HDD
Date: 16 Oct 2000 13:54:29 +0800

E J <[EMAIL PROTECTED]> wrote:
> The latest Norton Ghost can clone linux too according to their webpage.

but I wouldn't use it.

> I assume your new HDD connected to the primary master.
> and the old HDD is connected to secondary master.
> install a minimum linux on the new HDD.
> lilo: single linux
> bash# mkdir /mnt/harddisk
> bash# mount /dev/hdc2 /mnt/harddisk

> copy every directory under root except /boot and /proc

> bash# cp -a /mnt/harddisk/bin /bin
> bash# cp -a /mnt/harddisk/dev /dev
>  .....

I generally stuff things up when I use cp, but tar works very nicely indeed:

Something like this:
tar cl -C / /| tar x -C /mnt/harddisk

The 'l' (lowercase l) tells tar to stay in the local filesystem. If you want to copy 
other filesystems too, you need to name them:

tar cl -C / / /boot/ /home/ | tar x -C /mnt/harddisk

-C tells tar to change to the subject directory before processing.

You can also do it with afio (and it will probably be faster).


Note that by using tar (or afio) in this way, you can have the source and
destinations on different boxes (and neither need be the one you're working
on). If you're passing data over a slow (and slow is relative to CPU power too)
you'd want to compress the data, and afio is definitely better then as you can
control the compression level.

-- 

------------------------------

From: "exarch" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.networking,comp.os.linux.questions,comp.os.linux.redhat
Subject: Redhat 7.0 and Cable Internet
Date: Mon, 16 Oct 2000 06:50:47 GMT

Has anyone set up Optus@Home cable internet under redhat 7.0 ? or any other
version that applies to the situation ? any info would be helpfull, thanks.



------------------------------

From: Eric <[EMAIL PROTECTED]>
Subject: Re: Linux Partition Link Corrupted
Date: Mon, 16 Oct 2000 08:51:30 +0200
Reply-To: [EMAIL PROTECTED]

Bruceh wrote:
> 
> Eric,
> 
> /dev/hda6 is my Win98 D: drive which is accessible with both
> Win98 & linux.
> 
> Any other ideas?
> 
> -bruceh-
> 
> Eric wrote:
> 
> > Bruceh wrote:
> > >
> > > Eric... here it is...
> > >
> > > Disk /dev/hda: 240 heads, 63 sectors, 2343 cylinders
> > > Units = cylinders of 15120 * 512 bytes
> > >
> > >    Device Boot    Start       End    Blocks   Id  System
> > > /dev/hda1   *         1       586   4430128+   b  Win95 FAT32
> > > /dev/hda2           587      2343  13282920    f  Win95 Ext'd (LBA)
> > > /dev/hda5           587       594     60448+  83  Linux
> > > /dev/hda6          1173      2343   8852728+   b  Win95 FAT32
> > > /dev/hda7           595       871   2094088+  83  Linux
> > > /dev/hda8           872       941    529168+  82  Linux swap
> > > /dev/hda9           942      1172   1746328+  83  Linux
> > >
> > > -bruceh-
> > >
> > > Eric wrote:
> > >
> > > > Could you post the result of fdisk -l /dev/hda
> > > >
> > > > Eric
> >
> > The partition type of /dev/hda6 is wrong. It should be type c and not b.
> > I cannot guarantee you that changing it will be without side effects.
> > The entire extended partition may be/get corrupted (even if you do not
> > change it). So I'd back-up whatever you can change the type and cross
> > your fingers.
> >
> > Eric

It's not the fact that it can be seen: it's wrong. I overlooked the fact
that svend olaf mentioned. It shouldn't even be called hda6, hda7-hda9
all should shift one number down, and your D: should be hda9. I don't
know how to fix this, but svend-olaf mentioned sfdisk.
I don't know this tool, so contact him (through this NG) if you have any
questions.

Eric

------------------------------


** FOR YOUR REFERENCE **

The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:

    Internet: [EMAIL PROTECTED]

You can send mail to the entire list (and comp.os.linux.setup) via:

    Internet: [EMAIL PROTECTED]

Linux may be obtained via one of these FTP sites:
    ftp.funet.fi                                pub/Linux
    tsx-11.mit.edu                              pub/linux
    sunsite.unc.edu                             pub/Linux

End of Linux-Setup Digest
******************************

Reply via email to