[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

ipchains: cannot open file `/proc/net/ip_fwnames' (was: Re: "No such file or directory" - huh?!)



Joost Kooij wrote:

> On Sat, Jul 21, 2001 at 08:34:48PM +0200, Gary Jones wrote:
> > ash-ock:/etc/init.d# ./firewall
> > bash: ./firewall: No such file or directory
[snip]
> > What's going on? The script file is definitely there

> In the script, you are using a command with a tpyo in it or that is
> located in a place not in your current $PATH.

Nope. See later for how I know why not...

> Perhaps the command is "ipchains" (/sbin/ipchains) and you are used
> to doing "su" to become root?  In that case, next time do "su -", so
> you get a propor root login, with all the sbins in $PATH.

No, I ran that scripting session as root so that I wouldn't get anything silly 
like ownership issues.

and Tim Moss wrote:

> The "No such file" could be referring to the shebang line. Does /bin/sh 
> exist?

Yes.

I still don't know what caused the problem. What I ended up doing was something 
like:
cp ../init.d/firewall ../init.d/firewall.old
cp ../init.d/network ../init.d/firewall
jed ../init.d/firewall ../init.d/firewall.old
and then copying the contents of 'firewall.old' into 'firewall'. After that I 
didn't get "No such file or directory" any more, though the original reason is 
still a mystery to me. Thanks for your help, though.

Now I get:
ash-ock:~# ipchains -F
ipchains: cannot open file `/proc/net/ip_fwnames'
[which is not surprising, since...]
ash-ock:~# ls -la /proc/net/ip*
-rw-r--r--   1 root     root            0 Jul 22 10:29 /proc/net/ip_forward
-rw-r--r--   1 root     root            0 Jul 22 10:29 /proc/net/ip_input
-rw-r--r--   1 root     root            0 Jul 22 10:29 /proc/net/ip_output

*sigh* 

I thought creating all the stuff required was the job of the install routine?

I also get "setsockopt : protocol not available" when trying to set the policy. 
FWIW this is ipchains --version 1.3.4 (as per standard 'slink' distro, I believe)

-- 
Gary
Debian 2.1r4 (kernel v2.0.39); XFree86 3.3.6
Everything should be made as simple as possible, but not simpler. (Einstein)



Reply to: