Author Topic: Why can\'t I edit this file?  (Read 2119 times)

Anonymous

  • Guest
Why can\'t I edit this file?
« on: March 14, 2004, 04:20:47 am »
Hi all, I\'m tearing my hair out trying to edit my kismet.conf file...
I keep getting a write failed message. when using the text editor.
(opie enhanced) I have tried a couple of other editors and all give the same result...can\'t do it!
I have tried \"su\" but this doesn\'t make a difference.
Am I missing somethin here?
I really dont know anything about \"vi\" so I\'m trying to avoid using it to edit this file, but when I had a go at it I got the same result...
any help or comments welcome]
Andy

Synfin0

  • Newbie
  • *
  • Posts: 32
    • View Profile
Why can\'t I edit this file?
« Reply #1 on: March 14, 2004, 04:39:59 am »
Have you checked the file permissions?  A \"ls -l\" should show something like -rw-r--r-- beside your file.  What kind of device is it (mounted with what permissions)?  SD cards have read-only switches.  There might be other factors I have ignored, anyone?

It is possible to make a file read-only even to root (though vi asks if you want to override, I\'m not sure the other editors would).  Does the editor declare the file is read-only?  Can you make a new file in that directory?

Zuber

  • Sr. Member
  • ****
  • Posts: 277
    • View Profile
    • http://www.shirtpocket.co.uk
Why can\'t I edit this file?
« Reply #2 on: March 14, 2004, 02:17:05 pm »
Assuming the above did not help ...

Have you tried using a terminal based editor (sorry, don\'t know opie enhanced). I\'ve found some files simply refuse to cooperate unless you use a command line editor. I fond Easy Editor (ee) to be quite good.
Zuber
ShirtPocket Ltd.
www.shirtpocket.co.uk

Ethereal

  • Full Member
  • ***
  • Posts: 236
    • View Profile
    • http://
Why can\'t I edit this file?
« Reply #3 on: March 14, 2004, 03:27:08 pm »
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.
SL-6000L, Sharp ROM 1.12;
Socket Rev 2.5 CF Bluetooth::SE T608;
Sandisk 512MB SD, formatted ext2;
Pocketop IR Keyboard