Is the file you\'re trying to edit on the readonly filesystem? If the \"real\" (not symlinked) path to it isn\'t /home/<everything else> and you\'re using a Sharp-based ROM, it\'s on a filesystem that is mounted read-only. If this is the case, make very sure it\'s really something you want to be editing--Sharp made that FS readonly to safeguard against catastrophic mistakes.
Then,
mount /dev/root / -o remount, rw
This will remount your \"ROM\" as a writeable filesystem. (I had to do this recently to edit the \"real\" copy of rc.sysinit to make it run rc.local.)
Once you\'ve finished editing and saving the file, either reboot or
mount /dev/root / -o remount, ro
to put your ROM back out of harm\'s way.