Loading ...
Sorry, an error occurred while loading the content.
 

Re: Can't write to ntfs file system

Expand Messages
  • Joan Miquel Torres Rigo
    ... If I understood well, vim is executed as non privileged user, not root. But the permissions of all files (inexistent in ntfs) are set according to a
    Message 1 of 22 , Jan 4, 2012
      2012/1/4 Bram Moolenaar <Bram@...>:

      >
      > One suggestion I haven't heard yet: Try changing the 'backupcopy'
      > setting.
      >
      > Vim has some protection against doing bad things with root permission,
      > that might interfere with what you are doing.

      If I understood well, vim is executed as non privileged user, not root.

      But the permissions of all files (inexistent in ntfs) are set
      according to a predefined mask which, in this case, includes execution
      privilege for user, goup and other which, of course, can be a relative
      security risk if the owner is root. Maybe that is what you would
      mean...

      NOTE: The write permission in the mask cannot be removed because, for
      directorys, this means the "enter" permission (read and write
      permissions in directorys always belongs to its contents). Then, the
      only way to remove execution permission for root in a ntfs files is
      setting the ownership of the whole filesystem to other user..



      Regards.

      --
      Joan Miquel Torres__________________________________
      Linux Registered User #164872
      http://www.mallorcaweb.net/joanmiquel
      BULMA: http://bulma.net http://breu.bulma.net/?l2301

      --
      You received this message from the "vim_use" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
    • Marty Fried
      ... someone with root permission should know what they are doing, and is working without protection on purpose. Also, I m surprised that Vim would even know.
      Message 2 of 22 , Jan 4, 2012
        On Wed, Jan 4, 2012 at 4:37 AM, Bram Moolenaar <Bram@...> wrote:

        Vim has some protection against doing bad things with root permission,
        that might interfere with what you are doing.

        I'm surprised to hear this - it seems to go against the philosophy that someone with root permission should know what they are doing, and is working  without protection on purpose.  Also, I'm surprised that Vim would even know.

        I'm curious now about what sort of protection there is.

        -- 
        Marty Fried
         

        --
        You received this message from the "vim_use" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php
      • Graham Lawrence
        My apologies to all. It is something in my vimrc. Without that, vim creates and edits on ntfs without complaint. My thanks to Joan Miquel Torres Rigo for
        Message 3 of 22 , Jan 4, 2012
          My apologies to all. It is something in my vimrc. Without that, vim
          creates and edits on ntfs without complaint. My thanks to Joan Miquel
          Torres Rigo for the suggestion.

          --
          You received this message from the "vim_use" maillist.
          Do not top-post! Type your reply below the text you are replying to.
          For more information, visit http://www.vim.org/maillist.php
        • Joan Miquel Torres Rigo
          ... That s not exact: Root account should NEVER been used in production environments. You should use sudo instead. Apart of that, a welder also should know
          Message 4 of 22 , Jan 4, 2012
            2012/1/4 Marty Fried <marty@...>:
            >>
            > I'm surprised to hear this - it seems to go against the philosophy that
            > someone with root permission should know what they are doing, and is working
            >  without protection on purpose.

            That's not exact:

            Root account should NEVER been used in production environments. You
            should use sudo instead.

            Apart of that, a welder also should know what he are doing while
            managing soldering iron. But leaving things disordered in its
            workspace is always a bad idea. Even when you know exactly what you
            are doing.

            Similarly, having execution permission for file, like plain text or
            html, which is not designed to be executied, is a bad idea:

            First because you probably took less care about write access to that
            file because you didn't planed to execute it.

            And, second because, anytime you can, for example, forgive to type
            'vim' before the file name when trying to edit it.

            ...And I didn't talk about suid permission (which lets any user with
            execution permission to execute the file as if he were the owner
            --temporary "becoming him"--) ...but this permission is never set in
            usual umasks like when mounting not permission-enabled filesystems.



            Regards.

            --
            Joan Miquel Torres__________________________________
            Linux Registered User #164872
            http://www.mallorcaweb.net/joanmiquel
            BULMA: http://bulma.net http://breu.bulma.net/?l2301

            --
            You received this message from the "vim_use" maillist.
            Do not top-post! Type your reply below the text you are replying to.
            For more information, visit http://www.vim.org/maillist.php
          • Marty Fried
            On Wed, Jan 4, 2012 at 12:17 PM, Joan Miquel Torres Rigo
            Message 5 of 22 , Jan 4, 2012
              On Wed, Jan 4, 2012 at 12:17 PM, Joan Miquel Torres Rigo <joanmiquel@...> wrote:
              2012/1/4 Marty Fried <marty@...>:
              >>
              > I'm surprised to hear this - it seems to go against the philosophy that
              > someone with root permission should know what they are doing, and is working
              >  without protection on purpose.

              That's not exact:

              Root account should NEVER been used in production environments. You
              should use sudo instead.
              I agree.  That is why I believe that if someone is using root account for something, it is probably for maintenance, or to fix a problem.  It may be that the person has root access for maintenance, but is not in the sudo users file, and doesn't have time to set it up for a one-time use.  


              Apart of that, a welder also should know what he are doing while
              managing soldering iron. But leaving things disordered in its
              workspace is always a bad idea. Even when you know exactly what you
              are doing.
              I think the welder is the normal user.  It's more like root is a repair person, who is repairing the welder's equipment.  A welder shouldn't take the equipment apart, normally, but a repair person may need to, and knows what they are doing.  You don't want to disable the equipment in some way when he's working on it, as he may need it to be functioning normally to fix it.

               -- 
              Marty Fried

              --
              You received this message from the "vim_use" maillist.
              Do not top-post! Type your reply below the text you are replying to.
              For more information, visit http://www.vim.org/maillist.php
            • Christian Brabandt
              Hi Graham! ... What is the culprit? regards, Christian -- Ist mein Fleisch willig, kann Dein Geist noch so schwach sein. -- You received this message from the
              Message 6 of 22 , Jan 4, 2012
                Hi Graham!

                On Mi, 04 Jan 2012, Graham Lawrence wrote:

                > My apologies to all. It is something in my vimrc. Without that, vim
                > creates and edits on ntfs without complaint. My thanks to Joan Miquel
                > Torres Rigo for the suggestion.

                What is the culprit?

                regards,
                Christian
                --
                Ist mein Fleisch willig, kann Dein Geist noch so schwach sein.

                --
                You received this message from the "vim_use" maillist.
                Do not top-post! Type your reply below the text you are replying to.
                For more information, visit http://www.vim.org/maillist.php
              • Charles Campbell
                ... Nice philosophy, but: I suspect that due to the free nature of the various linux distros, there are quite a few root users who only barely know what
                Message 7 of 22 , Jan 4, 2012
                  Marty Fried wrote:
                  > On Wed, Jan 4, 2012 at 12:17 PM, Joan Miquel Torres Rigo
                  > <joanmiquel@... <mailto:joanmiquel@...>> wrote:
                  >
                  > 2012/1/4 Marty Fried <marty@...
                  > <mailto:marty@...>>:
                  > >>
                  > > I'm surprised to hear this - it seems to go against the
                  > philosophy that
                  > > someone with root permission should know what they are doing,
                  > and is working
                  > > without protection on purpose.
                  >
                  > That's not exact:
                  >
                  > Root account should NEVER been used in production environments. You
                  > should use sudo instead.
                  >
                  > I agree. That is why I believe that if someone is using root account
                  > for something, it is probably for maintenance, or to fix a problem.
                  > It may be that the person has root access for maintenance, but is not
                  > in the sudo users file, and doesn't have time to set it up for a
                  > one-time use.
                  >
                  >
                  > Apart of that, a welder also should know what he are doing while
                  > managing soldering iron. But leaving things disordered in its
                  > workspace is always a bad idea. Even when you know exactly what you
                  > are doing.
                  >
                  > I think the welder is the normal user. It's more like root is a
                  > repair person, who is repairing the welder's equipment. A welder
                  > shouldn't take the equipment apart, normally, but a repair person may
                  > need to, and knows what they are doing. You don't want to disable the
                  > equipment in some way when he's working on it, as he may need it to be
                  > functioning normally to fix it.
                  >
                  Nice philosophy, but: I suspect that due to the free nature of the
                  various linux distros, there are quite a few "root" users who only
                  barely know what they're doing. Having a complex editor like Vim doing
                  things (such as backups, changing permissions, changing ownership) isn't
                  a good idea imho. Such things should be done explicitly (ie.
                  chmod,chgrp, chown, or by menu); requiring all the barely to somewhat
                  competent root administrators to have mastered all the nuances of vim is
                  naive.
                  Admittedly, I didn't go over all 83 hits I got with helpgrep in detail.

                  Regards,
                  Chip Campbell

                  --
                  You received this message from the "vim_use" maillist.
                  Do not top-post! Type your reply below the text you are replying to.
                  For more information, visit http://www.vim.org/maillist.php
                • Marty Fried
                  On Wed, Jan 4, 2012 at 2:25 PM, Charles Campbell
                  Message 8 of 22 , Jan 4, 2012
                    On Wed, Jan 4, 2012 at 2:25 PM, Charles Campbell <Charles.E.Campbell@...> wrote:
                    Marty Fried wrote:

                    I agree.  That is why I believe that if someone is using root account for something, it is probably for maintenance, or to fix a problem.  It may be that the person has root access for maintenance, but is not in the sudo users file, and doesn't have time to set it up for a one-time use.


                    Nice philosophy, but: I suspect that due to the free nature of the various linux distros, there are quite a few "root" users who only barely know what they're doing.  Having a complex editor like Vim doing things (such as backups, changing permissions, changing ownership) isn't a good idea imho.  Such things should be done explicitly (ie. chmod,chgrp, chown, or by menu); requiring all the barely to somewhat competent root administrators to have mastered all the nuances of vim is naive.
                    Admittedly, I didn't go over all 83 hits I got with helpgrep in detail.
                    I guess I spoke somewhat out of ignorance; I wasn't aware that Vim did those things.  I don't even know how, and I'm not sure if I want to know.  :)

                    I use the explicit methods you mentioned. I'm a simple kind of guy, and I like things to be pretty modular, so I know what will happen.  When I use an editor, I only expect it to change the contents of the file.  It's nice that it allows me, after prompting, to save to a read-only file, and I appreciate it sometimes, but I wouldn't mind if it didn't.

                     I'll admit that I'm somewhat torn in my opinions about protecting barely competent users from themselves.  Throughout my long experience with computers, that's mostly the way I learned, by destroying things.  I learned things like backing up, not assuming things when the consequences matter, etc.

                    Now, if it were Windows, maybe I would expect the handholding.  But I've messed up Windows in the past, too.  :)

                    Regards,

                    Marty Fried

                    --
                    You received this message from the "vim_use" maillist.
                    Do not top-post! Type your reply below the text you are replying to.
                    For more information, visit http://www.vim.org/maillist.php
                  • porphyry5
                    ... Apparently there is no culprit. After creating the file as I described, I returned vimrc to its place, preparatory to testing each individual entry.
                    Message 9 of 22 , Jan 5, 2012
                      On Jan 4, 1:28 pm, Christian Brabandt <cbli...@...> wrote:
                      > Hi Graham!
                      >
                      > On Mi, 04 Jan 2012, Graham Lawrence wrote:
                      >
                      > > My apologies to all.  It is something in my vimrc.  Without that, vim
                      > > creates and edits on ntfs without complaint.  My thanks to Joan Miquel
                      > > Torres Rigo for the suggestion.
                      >
                      > What is the culprit?

                      Apparently there is no culprit. After creating the file as I
                      described, I returned vimrc to its place, preparatory to testing each
                      individual entry. Repetitive drudgery is not to my taste, so rather
                      than get down to it I decided to do a little clutching at straws.
                      Went back to the buffer of the file created on the ntfs drive, added
                      an "a" to it and issued a write command, which executed without
                      incident. Similarly I created another new file on the drive.

                      I have no explanation, and I'm not about to look for one.
                      >
                      > regards,
                      > Christian
                      > --
                      > Ist mein Fleisch willig, kann Dein Geist noch so schwach sein.

                      --
                      You received this message from the "vim_use" maillist.
                      Do not top-post! Type your reply below the text you are replying to.
                      For more information, visit http://www.vim.org/maillist.php
                    Your message has been successfully submitted and would be delivered to recipients shortly.