Find the answer to your Linux question:
Results 1 to 3 of 3
Hi all I know its a very silly question to ask I have my file "abc" with only read permission ls -lrt abc -r--r--r-- 1 userA users 140 Dec 28 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2010
    Location
    India
    Posts
    45

    permission problem..


    Hi all
    I know its a very silly question to ask

    I have my file "abc" with only read permission

    ls -lrt abc
    -r--r--r-- 1 userA users 140 Dec 28 17:09 abc
    but now when i am writing in that file using vi editor

    i do changes in the file and when i am going to save that file its asking me to use !
    vi abc

    file contents changed

    E45: 'readonly' option is set (add ! to override)
    now when i use :wq! in vi editor that file gets modified
    but its having only read permission not write how that file contents is being changed
    i want the file to be read only and no one can change the file content

  2. #2
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Location
    Harrow, UK
    Posts
    1,258
    You're right, logically it shouldn't do this. But this thread shows that it is possible to set up vim so that it does (and also how to stop it).
    "I'm just a little old lady; don't try to dazzle me with jargon!"
    www.hrussman.entadsl.com

  3. #3
    Just Joined!
    Join Date
    Dec 2010
    Location
    India
    Posts
    45
    thanks hazel
    its a great help

  4. $spacer_open
    $spacer_close

Posting Permissions

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