Red Hat Bugzilla – Bug 112385
VIM strips SUID bit on write (vim patch 6.0.235 needed)
Last modified: 2007-11-30 17:06:53 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1)
Description of problem:
When editing a suid file with vim, the suid bit is lost when the file
This is fixed (I believe) by vim patch 6.0.235.
This patch has been applied in vim versions greater than 6.0, so the
problem isn't evident in later versions of RedHat Enterprise Linux.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. create a SUID file
chmod 4755 foo
2. edit the file with vi and cause the file to be written (i.e. :w)
3. ls -l foo shows permissions set to rwxr-xr-x
Expected Results: file permissions should not be effected by the editor.
the suid bits on scripts are't used. Therefore I've added a patch to
CVS to make sure this gets in when we release a erratum.