VIM changing file SE context

I don't know why this works but I've wasted pretty much the whole day trying to put my ambition against my ignorance. If you encounter a problem with vim saving all your web files with a context type of user_home_t instead of inherited httpd_sys_content_t here's how I fixed mine (after much research, uninstallation and recompilation from sources, and eventually brute force one by one removal of all .vim/*):

Simply removing the following two lines from my .vimrc fixed the issue:

set backupdir=~/.vim/backup
set directory=~/.vim/backup

Why creating the backup was changing my file selinux context? Why only on my freshly installed CentOS 6?

I'm tired, and even though I won, I am not enlightened. Much like everything in real life.

Comments

Popular posts from this blog

Javascript factorial - performance considerations

Manual pages optimized for search as well as for reading

To escape or not to escape. Part 2.