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

Re: "No such file or directory" - huh?!



Gary Jones wrote:

Okay, now I'm /really/ confused! Who nicked my firewall script?!

Have a read of this (some snipped for brevity):

ash-ock:/etc/init.d# ls -la
total 60
drwxr-xr-x   2 root     root         1024 Jul 21 19:26 .
drwxr-xr-x  40 root     root         3072 Jul 21 19:24 ..
-rw-r--r--   1 root     root          840 Jan 12  1999 README
-rwxr-xr-x   1 root     root         2869 Nov  2  1998 alsa
-rwxr-xr-x   1 root     root         1683 Jan  8  1999 bootmisc.sh
-rwxr-xr-x   1 root     root          728 Jun 21  1998 checkfs.sh
-rwxr-xr-x   1 root     root         2776 Jan 12  1999 checkroot.sh
-rwxr-xr-x   1 root     root          835 Apr 11  1999 cron
-rwxr-xr-x   1 root     root         1046 Jul 21  1999 exim
-rwxr-xr-x   1 root     root          765 Jul 21 19:26 firewall
[snip]

ash-ock:/etc/init.d# ./firewall
bash: ./firewall: No such file or directory
ash-ock:/etc/init.d# ./hostname.sh
ash-ock:/etc/init.d# more ./firewall
#! /bin/sh
# Script to control packet filtering.
[snip]

What's going on? The script file is definitely there, I can 'more' it, 'jed' it, whatever I like except run it. I'm sure I'm missing something real simple here...





The "No such file" could be referring to the shebang line. Does /bin/sh exist? You may also want to remove the space in the shebang line and make it just say
#!/bin/sh
I'm not sure if a space there is "legal"



Reply to: