RE: VIm 7.2 on Linux - bug in temporary files
- Never mind. I found out what I was doing wrong. I had copied my vimfiles from a Windoze/cygwin system to my Linux system and I still had
in my .vimrc. For some reason I was NOT receiving a message that it could not execute my shell. I was only receiving the message that it could not read the temporary file.
I removed the above line and everything is working fine. FYI: How I found out.
I started editing a junk file. Typed :echo tempname()
to get the name of the temporary directory that would be used for this session. Then tried
!!ls -l /tmp/v39755
to try to list the contents of the directory as a filter. Then, and only then, did I receive a message stating that bash.exe could not be executed. That immediately told me what the problem was. Odd thing is that I did not get the same message when I tried other filters.
Warren D. Swan - “Woods”
IT Architect, SCM SME
IBM Global Point of Sale Team; Wal-Mart Enterprise
From: Bram Moolenaar <Bram@...> To: Warren Swan/Bentonville/IBM@IBMUS Cc: vim_use@... Date: 04/29/2009 04:00 AM Subject: RE: VIm 7.2 on Linux - bug in temporary files
Warren Swan wrote:
> gvim complains if the executable (vim) has the setuid bit on. Ifound out
> the hard way. I thought maybe making it setuid to root wouldwork, albeit
> making all new files belong to root!I've
> Since we're talking about a temporary file made within vim/gvim itself,
> the file comes and goes. There's no way to check its permissions.
> toyed with trying to make a debug version of vim so that I can findout
> what's going on.(as root,
> I'm not doing anything strange here at all. Just make install
> which is correct), and then using gvim. Certainly there mustbe other
> Linux users trying to use version 7.2 that are running into the sameI'm surprised you get this far when setting the setuid bit. In my
opinion this is a really bad idea, since all files you edit will be with
What happens is that Vim creates a directory in /tmp and changes the
permissions so that only the owner can read/write there. That is the
safest way to deal with temp files. The file will then be owned by
root, and the external command runs as yourself and won't be able to
access the file.
Don't use the setuid bit, use "sudo vim".
If your life is a hard drive,
Christ can be your backup.
/// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php