stevearc / oil.nvim

Neovim file explorer: edit your filesystem like a buffer
MIT License
3.84k stars 110 forks source link

feature request: support sshfs file manipulation with better permission check #347

Closed YaQia closed 5 months ago

YaQia commented 5 months ago

Did you check existing requests?

Describe the feature

Please add better permission check for sshfs to let oil.nvim to be modifiable in the sshfs dir.

Provide background

I want to use sshfs to smoothly edit files with lsp support in my host computer, so I tried remote-sshfs.nvim, which basiclly adds nvim frontend of sshfs command line. It works great, but oil.nvim can not edit files in the sshfs dir.

What is the significance of this feature?

nice to have

Additional details

If I use sshfs <server> <dest-dir> -o umask=755, oil.nvim will work. But once I saved the edited file, the file permission changes into ----w--w-, which is the opposite of 755. I can't understand what is going on.

BTW, cd, touch and other file modification commands can be normally executed without permission issue, even when I am not using -o umask=755.

YaQia commented 5 months ago

For anyone who want to use sshfs with oil.nvim: use sshfs username@computer:/remote/path /local/path -o idmap=user, which will map the ssh user into current host user. After setting this option, we can use it flawlessly.