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

Re: vim script can't create /tmp file

Expand Messages
  • Christian Brabandt
    ... Have you checked all your cronjobs and scripts, that you run? Can you eliminate, that root doesn t run some jobs, that clean /tmp? I once made a patch,
    Message 1 of 19 , Dec 5, 2012
      On Wed, December 5, 2012 09:37, sinbad wrote:
      > any other pointers on how to get rid of this error.
      > it's became very annoying.

      Have you checked all your cronjobs and scripts, that you run?
      Can you eliminate, that root doesn't run some jobs, that clean /tmp?

      I once made a patch, that changed Vims behaviour to check everytime,
      whether the temp directory is still valid and if not re-create it,
      but Bram didn't want to include it.

      Since this happens usually only very rarely, I have this command
      in my .vimrc:
      " In case /tmp get's clean out, make a new tmp directory for vim
      :command! Mktmpdir call mkdir(fnamemodify(tempname(),":p:h"),"",0700)

      regards,
      Christian

      --
      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
    • Gary Johnson
      ... You may have to do some digging to find root s cron jobs. For example, on my Ubuntu 10.04 system, sudo cron -l -u root says that root has no cron jobs,
      Message 2 of 19 , Dec 5, 2012
        On 2012-12-05, Christian Brabandt wrote:
        > On Wed, December 5, 2012 09:37, sinbad wrote:
        > > any other pointers on how to get rid of this error.
        > > it's became very annoying.
        >
        > Have you checked all your cronjobs and scripts, that you run?
        > Can you eliminate, that root doesn't run some jobs, that clean /tmp?

        You may have to do some digging to find root's cron jobs. For
        example, on my Ubuntu 10.04 system, "sudo cron -l -u root" says that
        root has no cron jobs, but it does run /etc/crontab and the scripts
        in /etc/cron.d. It doesn't clean /tmp, though.

        Gary

        --
        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
      • sinbad
        ... I am running as non-root and i don t have sudo permission, i was not able to check the root s cron jobs, i checked mine there are no cron jobs running. am
        Message 3 of 19 , Dec 10, 2012
          On Wednesday, December 5, 2012 10:51:05 PM UTC+5:30, Gary Johnson wrote:
          > On 2012-12-05, Christian Brabandt wrote:
          >
          > > On Wed, December 5, 2012 09:37, sinbad wrote:
          >
          > > > any other pointers on how to get rid of this error.
          >
          > > > it's became very annoying.
          >
          > >
          >
          > > Have you checked all your cronjobs and scripts, that you run?
          >
          > > Can you eliminate, that root doesn't run some jobs, that clean /tmp?
          >
          >
          >
          > You may have to do some digging to find root's cron jobs. For
          >
          > example, on my Ubuntu 10.04 system, "sudo cron -l -u root" says that
          >
          > root has no cron jobs, but it does run /etc/crontab and the scripts
          >
          > in /etc/cron.d. It doesn't clean /tmp, though.
          >
          >
          >
          > Gary

          I am running as non-root and i don't have sudo
          permission, i was not able to check the root's
          cron jobs, i checked mine there are no cron
          jobs running. am i screwed ?

          --
          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
          ... It s annoying but you are not screwed. Simply recreate that directory and you should be fine. See the command, I posted earlier. regards, Christian -- You
          Message 4 of 19 , Dec 10, 2012
            On Tue, December 11, 2012 07:15, sinbad wrote:
            > I am running as non-root and i don't have sudo
            > permission, i was not able to check the root's
            > cron jobs, i checked mine there are no cron
            > jobs running. am i screwed ?

            It's annoying but you are not screwed. Simply recreate that
            directory and you should be fine. See the command, I posted
            earlier.

            regards,
            Christian

            --
            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
          • Gary Johnson
            ... I don t think it s hopeless, but may be difficult to find the cause. You wrote that you don t have root or sudo permission. That suggests that you are
            Message 5 of 19 , Dec 10, 2012
              On 2012-12-10, sinbad wrote:
              > On Wednesday, December 5, 2012 10:51:05 PM UTC+5:30, Gary Johnson wrote:
              > > On 2012-12-05, Christian Brabandt wrote:

              > > > Have you checked all your cronjobs and scripts, that you run?
              > > > Can you eliminate, that root doesn't run some jobs, that clean /tmp?
              > >
              > > You may have to do some digging to find root's cron jobs. For
              > > example, on my Ubuntu 10.04 system, "sudo cron -l -u root" says that
              > > root has no cron jobs, but it does run /etc/crontab and the scripts
              > > in /etc/cron.d. It doesn't clean /tmp, though.

              > I am running as non-root and i don't have sudo
              > permission, i was not able to check the root's
              > cron jobs, i checked mine there are no cron
              > jobs running. am i screwed ?

              I don't think it's hopeless, but may be difficult to find the cause.

              You wrote that you don't have root or sudo permission. That
              suggests that you are using a computer administered by someone else.
              Can you just ask that person or someone in that group if they know
              of any /tmp-cleaning program that might be running?

              On my Ubuntu 10.04 and Fedora 14 systems, all the /etc/cron* files
              have 755 permissions, so you could poke around there and see if you
              can find some /tmp cleaner.

              It _might_ help to know the timing of these deletions. Do they
              happen after Vim has been running for a certain amount of time? Do
              they happen at certain times of day, or at a certain number of
              minutes past the hour? That might give you a clue to the cause. If
              you could predict the times at which it occurs, you could possibly
              run "ps -ef" in a loop at that time and look for suspicious
              processes.

              HTH,
              Gary

              --
              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
            • sinbad
              ... there are two possibilities here, first one of vim script is deleting the tmpfile, the other is some cron job might be deleting it. in the first case can i
              Message 6 of 19 , Dec 11, 2012
                On Tuesday, December 11, 2012 12:51:56 PM UTC+5:30, Gary Johnson wrote:
                > On 2012-12-10, sinbad wrote:
                >
                > > On Wednesday, December 5, 2012 10:51:05 PM UTC+5:30, Gary Johnson wrote:
                >
                > > > On 2012-12-05, Christian Brabandt wrote:
                >
                >
                >
                > > > > Have you checked all your cronjobs and scripts, that you run?
                >
                > > > > Can you eliminate, that root doesn't run some jobs, that clean /tmp?
                >
                > > >
                >
                > > > You may have to do some digging to find root's cron jobs. For
                >
                > > > example, on my Ubuntu 10.04 system, "sudo cron -l -u root" says that
                >
                > > > root has no cron jobs, but it does run /etc/crontab and the scripts
                >
                > > > in /etc/cron.d. It doesn't clean /tmp, though.
                >
                >
                >
                > > I am running as non-root and i don't have sudo
                >
                > > permission, i was not able to check the root's
                >
                > > cron jobs, i checked mine there are no cron
                >
                > > jobs running. am i screwed ?
                >
                >
                >
                > I don't think it's hopeless, but may be difficult to find the cause.
                >
                >
                >
                > You wrote that you don't have root or sudo permission. That
                >
                > suggests that you are using a computer administered by someone else.
                >
                > Can you just ask that person or someone in that group if they know
                >
                > of any /tmp-cleaning program that might be running?
                >
                >
                >
                > On my Ubuntu 10.04 and Fedora 14 systems, all the /etc/cron* files
                >
                > have 755 permissions, so you could poke around there and see if you
                >
                > can find some /tmp cleaner.
                >
                >
                >
                > It _might_ help to know the timing of these deletions. Do they
                >
                > happen after Vim has been running for a certain amount of time? Do
                >
                > they happen at certain times of day, or at a certain number of
                >
                > minutes past the hour? That might give you a clue to the cause. If
                >
                > you could predict the times at which it occurs, you could possibly
                >
                > run "ps -ef" in a loop at that time and look for suspicious
                >
                > processes.
                >
                >
                >
                > HTH,
                >
                > Gary

                there are two possibilities here, first one of vim
                script is deleting the tmpfile, the other is some cron
                job might be deleting it. in the first case can i put a
                watch on the tmpfile created from with in vim. In the
                latter case, can i force vim to create the tmp directory
                in my homedir rather than in /tmp so that the cron job
                won't have access to it. please suggest ways to achieve
                above.

                --
                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
              • Gary Johnson
                ... Somebody suggested earlier a way to put a watch on that tmpfile, but you apparently don t have permission to do that. As for putting your tmp directory
                Message 7 of 19 , Dec 11, 2012
                  On 2012-12-11, sinbad wrote:

                  > there are two possibilities here, first one of vim
                  > script is deleting the tmpfile, the other is some cron
                  > job might be deleting it. in the first case can i put a
                  > watch on the tmpfile created from with in vim. In the
                  > latter case, can i force vim to create the tmp directory
                  > in my homedir rather than in /tmp so that the cron job
                  > won't have access to it. please suggest ways to achieve
                  > above.

                  Somebody suggested earlier a way to put a watch on that tmpfile, but
                  you apparently don't have permission to do that.

                  As for putting your tmp directory someplace else,

                  :help tempfile

                  says that on Unix, Vim uses the first of this list of directories:
                  $TMPDIR, /tmp, current-dir, $HOME. Therefore, you could set TMPDIR
                  in your environment before starting Vim, either by setting it in
                  your shell's .rc file (e.g., ~/.bashrc) or by setting it as you
                  start Vim, e.g.,

                  TMPFILE=~/tmp vim

                  You could put that in a wrapper script or in an alias:

                  alias vim='TMPFILE=~/tmp vim'

                  Regards,
                  Gary

                  --
                  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
                • Gary Johnson
                  ... An even easier way is to put a line like this towards the top of your ~/.vimrc: let $TMPDIR = $HOME. /tmp Regards, Gary -- You received this message from
                  Message 8 of 19 , Dec 11, 2012
                    On 2012-12-11, Gary Johnson wrote:
                    > On 2012-12-11, sinbad wrote:
                    >
                    > > there are two possibilities here, first one of vim
                    > > script is deleting the tmpfile, the other is some cron
                    > > job might be deleting it. in the first case can i put a
                    > > watch on the tmpfile created from with in vim. In the
                    > > latter case, can i force vim to create the tmp directory
                    > > in my homedir rather than in /tmp so that the cron job
                    > > won't have access to it. please suggest ways to achieve
                    > > above.
                    >
                    > Somebody suggested earlier a way to put a watch on that tmpfile, but
                    > you apparently don't have permission to do that.
                    >
                    > As for putting your tmp directory someplace else,
                    >
                    > :help tempfile
                    >
                    > says that on Unix, Vim uses the first of this list of directories:
                    > $TMPDIR, /tmp, current-dir, $HOME. Therefore, you could set TMPDIR
                    > in your environment before starting Vim, either by setting it in
                    > your shell's .rc file (e.g., ~/.bashrc) or by setting it as you
                    > start Vim, e.g.,
                    >
                    > TMPFILE=~/tmp vim
                    >
                    > You could put that in a wrapper script or in an alias:
                    >
                    > alias vim='TMPFILE=~/tmp vim'

                    An even easier way is to put a line like this towards the top of
                    your ~/.vimrc:

                    let $TMPDIR = $HOME."/tmp"

                    Regards,
                    Gary

                    --
                    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
                  • sinbad
                    ... Gary, Christian, thanks for the help. setting $TMPDIR to my homedir solved the problem, so it s really one of the root s cron jobs screwing with my /tmp
                    Message 9 of 19 , Dec 13, 2012
                      On Tuesday, December 11, 2012 10:10:02 PM UTC+5:30, Gary Johnson wrote:
                      > On 2012-12-11, Gary Johnson wrote:
                      >
                      > > On 2012-12-11, sinbad wrote:
                      >
                      > >
                      >
                      > > > there are two possibilities here, first one of vim
                      >
                      > > > script is deleting the tmpfile, the other is some cron
                      >
                      > > > job might be deleting it. in the first case can i put a
                      >
                      > > > watch on the tmpfile created from with in vim. In the
                      >
                      > > > latter case, can i force vim to create the tmp directory
                      >
                      > > > in my homedir rather than in /tmp so that the cron job
                      >
                      > > > won't have access to it. please suggest ways to achieve
                      >
                      > > > above.
                      >
                      > >
                      >
                      > > Somebody suggested earlier a way to put a watch on that tmpfile, but
                      >
                      > > you apparently don't have permission to do that.
                      >
                      > >
                      >
                      > > As for putting your tmp directory someplace else,
                      >
                      > >
                      >
                      > > :help tempfile
                      >
                      > >
                      >
                      > > says that on Unix, Vim uses the first of this list of directories:
                      >
                      > > $TMPDIR, /tmp, current-dir, $HOME. Therefore, you could set TMPDIR
                      >
                      > > in your environment before starting Vim, either by setting it in
                      >
                      > > your shell's .rc file (e.g., ~/.bashrc) or by setting it as you
                      >
                      > > start Vim, e.g.,
                      >
                      > >
                      >
                      > > TMPFILE=~/tmp vim
                      >
                      > >
                      >
                      > > You could put that in a wrapper script or in an alias:
                      >
                      > >
                      >
                      > > alias vim='TMPFILE=~/tmp vim'
                      >
                      >
                      >
                      > An even easier way is to put a line like this towards the top of
                      >
                      > your ~/.vimrc:
                      >
                      >
                      >
                      > let $TMPDIR = $HOME."/tmp"
                      >
                      >
                      >
                      > Regards,
                      >
                      > Gary

                      Gary, Christian, thanks for the help.
                      setting $TMPDIR to my homedir solved
                      the problem, so it's really one of the
                      root's cron jobs screwing with my /tmp
                      files.

                      --
                      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.