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

Re: my .muttrc is locked (i.e., read-only)

p <pplaw@pcisys.net> [2002-12-20 04:21:28 +0000]:
> > my .muttrc is "read-only."  I need to
> > > -rw-rw-rw-    1 bt       bt           8503 Oct 31 00:13 .muttrc

That does not look read-only to me.  Looks very writable.  Too

> ...oops, sorry about the "world writeable."
> (the three 6's should've tipped me off.
> whew!)  thx for the heads-up.

As Osamu said, you should chmod it so that it is not other writeable.

  chmod 0644 ~/.muttrc

> anyway, i'm able to save changes to the file 
> _if_ i use the "!" to the command, ":wq".  I

You should be able to write that file normally without needing to
resort to ':wq!'.  Very strange.

> guess the file is locked because it's a "hid-

You must be thinking about other types of systems.  On unix you do not
have "locked" files in the sense that you are talking about.  (It does
but in a different meaning of the word.)  In unix you have file
permissions.  If you have permission then you can write the file.  If
not then you cannot.  Put that concept of locked files out of your
head.  It does not apply to why you can't write files.

> den" file?  (the message i get after vi 
> .muttrc is, ".muttrc already locked, session
> is read-only.")  my non-"dot" files don't 

Ah!  Now we see the problem!  'vi' is giving you this message.  It
means that vi is editing the file in another window or by another user
or by yourself in another login.  This is a message from vi that the
last person who saves wins and therefore it is complaining loudly
right at the start.

If you were to switch to a different editor, such as ed, emacs, or
whatever, you would no see that message as those programs would not
have known what vi was doing.  And the reverse because vi would not
know about which files those programs were editing either.

Do a 'ps -ef | grep vi' to find if you have any other process running
that is also editing that file.  Look in /var/tmp/vi.recover and see
what files are there.  The name will be scrambled.  But if there are
files there then one of those is the corresponding one to your .muttrc
file being edited in that other process.


Attachment: pgpqmmGf9tl2a.pgp
Description: PGP signature

Reply to: