vim error 'E45: 'readonly' option is set' on a file with write permission Debian 9 vim 8.0.707











up vote
-1
down vote

favorite












I wonder why I have the error in title while the edited file have write bit enabled and the good user :



# ls -l /etc/hosts
-rw-r--r-- 1 root root 693 Nov 15 09:46 /etc/hosts
# whoami
root


Any idea ? A setting ? A bug ?



Tried set readonly=noro, but I get



E474: Invalid argument: readonly=noro


from vim vimrc



Tried :



set noro:verb set readonly?


and



set noreadonly


without any change, nor error










share|improve this question




























    up vote
    -1
    down vote

    favorite












    I wonder why I have the error in title while the edited file have write bit enabled and the good user :



    # ls -l /etc/hosts
    -rw-r--r-- 1 root root 693 Nov 15 09:46 /etc/hosts
    # whoami
    root


    Any idea ? A setting ? A bug ?



    Tried set readonly=noro, but I get



    E474: Invalid argument: readonly=noro


    from vim vimrc



    Tried :



    set noro:verb set readonly?


    and



    set noreadonly


    without any change, nor error










    share|improve this question


























      up vote
      -1
      down vote

      favorite









      up vote
      -1
      down vote

      favorite











      I wonder why I have the error in title while the edited file have write bit enabled and the good user :



      # ls -l /etc/hosts
      -rw-r--r-- 1 root root 693 Nov 15 09:46 /etc/hosts
      # whoami
      root


      Any idea ? A setting ? A bug ?



      Tried set readonly=noro, but I get



      E474: Invalid argument: readonly=noro


      from vim vimrc



      Tried :



      set noro:verb set readonly?


      and



      set noreadonly


      without any change, nor error










      share|improve this question















      I wonder why I have the error in title while the edited file have write bit enabled and the good user :



      # ls -l /etc/hosts
      -rw-r--r-- 1 root root 693 Nov 15 09:46 /etc/hosts
      # whoami
      root


      Any idea ? A setting ? A bug ?



      Tried set readonly=noro, but I get



      E474: Invalid argument: readonly=noro


      from vim vimrc



      Tried :



      set noro:verb set readonly?


      and



      set noreadonly


      without any change, nor error







      vim vimrc






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 15 at 22:58

























      asked Nov 15 at 10:36









      Mévatlavé Kraspek

      1014




      1014






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          A straightforward explanation would be that 'readonly' was explicitly set, either via :set readonly or by opening the file with :view /etc/hosts. You should then be able to avoid the E45 with :write!.






          share|improve this answer





















          • Tried set readonly=noro, bu I get E474: Invalid argument: readonly= in vimrc
            – Mévatlavé Kraspek
            Nov 15 at 11:44








          • 1




            That would be :set noreadonly. The fact that you've attempted to put this into your .vimrc hints that you have not much of a clue what you're doing... this doesn't bode well for productive troubleshooting.
            – Ingo Karkat
            Nov 15 at 11:47










          • I don't try to type this each time in command mode, but modify my vimrc
            – Mévatlavé Kraspek
            Nov 15 at 11:50










          • And with set noreadonly in vimrc, still the problem
            – Mévatlavé Kraspek
            Nov 15 at 11:52










          • Can you force-write (with :w!)? If not, this really is a filesystem permission problem, not a Vim setting.
            – Ingo Karkat
            Nov 15 at 11:53











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














           

          draft saved


          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1375624%2fvim-error-e45-readonly-option-is-set-on-a-file-with-write-permission-debian%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          0
          down vote













          A straightforward explanation would be that 'readonly' was explicitly set, either via :set readonly or by opening the file with :view /etc/hosts. You should then be able to avoid the E45 with :write!.






          share|improve this answer





















          • Tried set readonly=noro, bu I get E474: Invalid argument: readonly= in vimrc
            – Mévatlavé Kraspek
            Nov 15 at 11:44








          • 1




            That would be :set noreadonly. The fact that you've attempted to put this into your .vimrc hints that you have not much of a clue what you're doing... this doesn't bode well for productive troubleshooting.
            – Ingo Karkat
            Nov 15 at 11:47










          • I don't try to type this each time in command mode, but modify my vimrc
            – Mévatlavé Kraspek
            Nov 15 at 11:50










          • And with set noreadonly in vimrc, still the problem
            – Mévatlavé Kraspek
            Nov 15 at 11:52










          • Can you force-write (with :w!)? If not, this really is a filesystem permission problem, not a Vim setting.
            – Ingo Karkat
            Nov 15 at 11:53















          up vote
          0
          down vote













          A straightforward explanation would be that 'readonly' was explicitly set, either via :set readonly or by opening the file with :view /etc/hosts. You should then be able to avoid the E45 with :write!.






          share|improve this answer





















          • Tried set readonly=noro, bu I get E474: Invalid argument: readonly= in vimrc
            – Mévatlavé Kraspek
            Nov 15 at 11:44








          • 1




            That would be :set noreadonly. The fact that you've attempted to put this into your .vimrc hints that you have not much of a clue what you're doing... this doesn't bode well for productive troubleshooting.
            – Ingo Karkat
            Nov 15 at 11:47










          • I don't try to type this each time in command mode, but modify my vimrc
            – Mévatlavé Kraspek
            Nov 15 at 11:50










          • And with set noreadonly in vimrc, still the problem
            – Mévatlavé Kraspek
            Nov 15 at 11:52










          • Can you force-write (with :w!)? If not, this really is a filesystem permission problem, not a Vim setting.
            – Ingo Karkat
            Nov 15 at 11:53













          up vote
          0
          down vote










          up vote
          0
          down vote









          A straightforward explanation would be that 'readonly' was explicitly set, either via :set readonly or by opening the file with :view /etc/hosts. You should then be able to avoid the E45 with :write!.






          share|improve this answer












          A straightforward explanation would be that 'readonly' was explicitly set, either via :set readonly or by opening the file with :view /etc/hosts. You should then be able to avoid the E45 with :write!.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 15 at 11:35









          Ingo Karkat

          17.2k22142




          17.2k22142












          • Tried set readonly=noro, bu I get E474: Invalid argument: readonly= in vimrc
            – Mévatlavé Kraspek
            Nov 15 at 11:44








          • 1




            That would be :set noreadonly. The fact that you've attempted to put this into your .vimrc hints that you have not much of a clue what you're doing... this doesn't bode well for productive troubleshooting.
            – Ingo Karkat
            Nov 15 at 11:47










          • I don't try to type this each time in command mode, but modify my vimrc
            – Mévatlavé Kraspek
            Nov 15 at 11:50










          • And with set noreadonly in vimrc, still the problem
            – Mévatlavé Kraspek
            Nov 15 at 11:52










          • Can you force-write (with :w!)? If not, this really is a filesystem permission problem, not a Vim setting.
            – Ingo Karkat
            Nov 15 at 11:53


















          • Tried set readonly=noro, bu I get E474: Invalid argument: readonly= in vimrc
            – Mévatlavé Kraspek
            Nov 15 at 11:44








          • 1




            That would be :set noreadonly. The fact that you've attempted to put this into your .vimrc hints that you have not much of a clue what you're doing... this doesn't bode well for productive troubleshooting.
            – Ingo Karkat
            Nov 15 at 11:47










          • I don't try to type this each time in command mode, but modify my vimrc
            – Mévatlavé Kraspek
            Nov 15 at 11:50










          • And with set noreadonly in vimrc, still the problem
            – Mévatlavé Kraspek
            Nov 15 at 11:52










          • Can you force-write (with :w!)? If not, this really is a filesystem permission problem, not a Vim setting.
            – Ingo Karkat
            Nov 15 at 11:53
















          Tried set readonly=noro, bu I get E474: Invalid argument: readonly= in vimrc
          – Mévatlavé Kraspek
          Nov 15 at 11:44






          Tried set readonly=noro, bu I get E474: Invalid argument: readonly= in vimrc
          – Mévatlavé Kraspek
          Nov 15 at 11:44






          1




          1




          That would be :set noreadonly. The fact that you've attempted to put this into your .vimrc hints that you have not much of a clue what you're doing... this doesn't bode well for productive troubleshooting.
          – Ingo Karkat
          Nov 15 at 11:47




          That would be :set noreadonly. The fact that you've attempted to put this into your .vimrc hints that you have not much of a clue what you're doing... this doesn't bode well for productive troubleshooting.
          – Ingo Karkat
          Nov 15 at 11:47












          I don't try to type this each time in command mode, but modify my vimrc
          – Mévatlavé Kraspek
          Nov 15 at 11:50




          I don't try to type this each time in command mode, but modify my vimrc
          – Mévatlavé Kraspek
          Nov 15 at 11:50












          And with set noreadonly in vimrc, still the problem
          – Mévatlavé Kraspek
          Nov 15 at 11:52




          And with set noreadonly in vimrc, still the problem
          – Mévatlavé Kraspek
          Nov 15 at 11:52












          Can you force-write (with :w!)? If not, this really is a filesystem permission problem, not a Vim setting.
          – Ingo Karkat
          Nov 15 at 11:53




          Can you force-write (with :w!)? If not, this really is a filesystem permission problem, not a Vim setting.
          – Ingo Karkat
          Nov 15 at 11:53


















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1375624%2fvim-error-e45-readonly-option-is-set-on-a-file-with-write-permission-debian%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          What is the Guru Parampara of Kashmiri Shaivism?

          Герой Советского Союза

          AnyDesk - Fatal Program Failure