Warren Swan wrote:

> gvim complains if the executable (vim) has the setuid bit on.  I found out 
> the hard way.  I thought maybe making it setuid to root would work, albeit 
> making all new files belong to root!
> 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.  I've 
> toyed with trying to make a debug version of vim so that I can find out 
> what's going on.
> 
> I'm not doing anything strange here at all.   Just make install (as root, 
> which is correct), and then using gvim.  Certainly there must be other 
> Linux users trying to use version 7.2 that are running into the same 
> problem!

I'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
root permissions.

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 -- [email protected] -- 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to