I added the following code to my .vimrc:
\" save and restore folds when a file is closed and re-opened autocmd BufWinLeave *.* mkview autocmd BufWinEnter *.* sil
i had a similar problem. maybe you have to create the directory which holds the data.
mkdir -p ~/.vim/view chmod 0750 ~/.vim ~/.vim/view