SchoofsKelvin / vscode-sshfs

Extension for Visual Studio Code: File system provider using SSH
GNU General Public License v3.0
546 stars 36 forks source link

Group permissions on files change after save #200

Open twiclo opened 4 years ago

twiclo commented 4 years ago

I share a dev server with another person and whenever he saves something he's accessing via this plugin it changes the group owner on the file to his group. What can be done about that?

SchoofsKelvin commented 4 years ago

Similar to #39

Currently, the extension already tries to maintain the permissions. Whenever a file gets modified, I first query the current mode and use that. (There seems to be no way to just write remotely without changing the mode).

While ssh2 does seem to have a way of setting user/group ownership of a file, that isn't part of just writing files. This might be a bug on their end.

I could perhaps try something like querying the file ownership before and after, although that might lead to other problems. Can you give a quick example of the before/after ownership of the file and that other person's groups?