OpenWrt Forum Archive

Topic: how to edit files?

The content of this topic has been archived on 4 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,

now that I have a internet connection, i want to edit the firewall script, so mldonkey can get a high id!
So which file must I edit for this? I think it would be the firewall.user in /etc , right? So my problem is, that i cant write into this file! I have deleted the symlink from /rom/etc/firewall.user and copied it from there to /etc. But never the less it does not work. So can somebody of you please explain me how this works?
I use openwrt-wrt54gs-squashfs.bin

regards

samson

What exactly does not work? Your changes to the firewall rules? Writing the new file?

Show us df -h, mount and the file, if the answer for question 2 is yes.

I can create new files, e.g. with touch filname, but i can not edit files. If i try it with vi, i can not save them.


root@OpenWrt:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 1.0M      1.0M         0 100% /rom
/dev/mtdblock/4           6.1M    708.0k      5.4M  11% /
none                     14.9M     20.0k     14.9M   0% /tmp
root@OpenWrt:~# mount
/dev/root on /rom type squashfs (ro)
none on /rom/dev type devfs (rw)
/dev/mtdblock/4 on / type jffs2 (rw)
none on /proc type proc (rw)
none on /dev type devfs (rw)
none on /tmp type tmpfs (rw,nosuid,nodev)
none on /dev/pts type devpts (rw)
root@OpenWrt:~#

show us the ls -l /etc/firewall.user

root@OpenWrt:~# ls -l /etc/firewall.user
-rwxrwxrwt    1 root     root          981 Jan  1 00:26 /etc/firewall.user
root@OpenWrt:~#

ok,
forget that stupid question! Its a long time ago I used vi, so I have simply forgot haow to use it correct.
Now it works.

regards

samson

then install joe or nano form external repositories smile

The discussion might have continued from here.