Re: Can't maks shell script excutable!! William Comeau wrote:
> I have the following bash file and I can't make it executable.It is in
> dir /etc/rcS.d.
>
> #!/bin/bash
> echo "1" > /proc/sys/net/ipv4/ip_forward
> iptables=/sbin/iptables
> iptables --flush -t nat
> iptables --table nat --append POSTROUTING --out-interface ppp0 -j
> MASQUERADE
> # The following tells to accept the network card information.
> iptables --append FORWARD --in-interface eth0 -j ACCEPT
> # The following are a basic firewall.
> iptables -A INPUT -i ppp0 -m state --state NEW,INVALID -j DROP
> iptables -A FORWARD -i ppp0 -m state --state NEW,INVALID -j DROP
>
> After making the file I right click on the file and select properties
> and select " is executable".Reboot the distro (Mepis).Check the file and
> it is just a txt file and not executable.Shure would appreciate some
> help to solve this problem.
You do not need to reboot until you are certain that the file is an
executable.
Open a terminal, log in as root using su, chmod +x <bashfilename>. That
should do it. |