rolf007 / multiplayer.vim

3 stars 2 forks source link

Can't use as different users #1

Open Nicknakin opened 4 years ago

Nicknakin commented 4 years ago

Error detected while processing function multiplayer#Connect[44]..61_SendBr oadcastMsg[5]..61_SendUnicastMsg: line 1: E482: Can't create file /tmp/vim_multi_player_pipe_2507 Press ENTER or type command to continue Error detected while processing function multiplayer#Connect[44]..61_SendBr oadcastMsg[5]..61_SendUnicastMsg: line 1: E482: Can't create file /tmp/vim_multi_player_pipe_3025

vitalstarorg commented 4 years ago

I experienced the same issue. After some debugging, the line causing the problem is here.

When I check the file permission on /tmp/vim_multi_playerpipe*, it is prw-rw----

Since multiplayer.vim using these pipes for communication, so other users cannot open this pipe. I guess the test environment for multiplayer.vim might be different than ours, so it fails as you indicate.

Solution one: $ umask 20 note: it will make all files you create allowing other users to read and modify.

Solution two: $ (umask 20 && vim filename) note: umask will only affect vim file and /tmp/vim_multi_player_pipe* creation. Not sure it will open a security hole for your vim.

Solution three: Clone the project and change the line as this.

After this change, this very-well-made plugin works in my multi-user system! Still learning how to use it :)