Find the answer to your Linux question:
Results 1 to 4 of 4
I was editing a file in vi, the application crashed resulting a reboot of the system and when I go back and try to edit the same file it returns ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2004
    Posts
    11

    Vi issues


    I was editing a file in vi, the application crashed resulting a reboot of the system and when I go back and try to edit the same file it returns that it is now read only.

    I've deleted the file.swp and the file~ that tend to get created sometime when these things happen. I still am unable to edit the file in question.

    How can I edit this file?

  2. #2
    Linux User
    Join Date
    Jun 2003
    Location
    Calgary, AB CANADA
    Posts
    496
    What are the permissions for that file set to?
    To check, issue an
    Code:
    ls -l
    on the directory that it's in to see what they are set to. To change them, use the chmod command.

    Hope this helps!
    \"Everything should be made as simple as possible, but not simpler.\"
    Albert Einstein

  3. #3
    Just Joined!
    Join Date
    Jan 2004
    Posts
    11
    The directories were when created set to chmod 0511, i've even trying accessing them as root (super user), vi still states that its read-only. Unfortunately i'll have to do some more research on this issue since i'm currently stuck at work.

    Thanks for any kind of help in this issue.

  4. $spacer_open
    $spacer_close
  5. #4
    flw
    flw is offline
    Linux Engineer
    Join Date
    Mar 2003
    Location
    U.S.A.
    Posts
    1,025
    If you look here http://www.linuxforums.org/forum/viewforum.php?f=11 you'll see a short and concise tut on chmod usage.
    Dan

    \"Keep your friends close and your enemies even closer\" from The Art of War by Sun Tzu\"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •