Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't connect to socket using gsudo with Google Drive FS #32

Closed
kiberdruzhinnik opened this issue May 13, 2020 · 4 comments
Closed

Can't connect to socket using gsudo with Google Drive FS #32

kiberdruzhinnik opened this issue May 13, 2020 · 4 comments

Comments

@kiberdruzhinnik
Copy link

kiberdruzhinnik commented May 13, 2020

Using latest gsudo and Google Drive FS both installed via chocolatey packages and each time I type "sudo ..." there are warnings mentioned on attached screenshot.

gsudo v0.7.0
google-drive-file-stream v38.0.16.0

image

@gerardog
Copy link
Owner

Hi kotasher,
Certainly it's not gsudo writing those warnings. It's probably GDFS running into an internal issue. Probably gsudo is just trying to read a GDFS folder.

I installed GDFS on a VM, and I was not able to reproduce this issue.

  • The Error: The operation was canceled by the user is just because you clicked on no on the UAC popup, right?
  • Whats the outcome if you use 'gsudo' instead of 'sudo'? also use gsudo --debug cup all for more detailed info please.
  • Whats the output of where sudo in cmd? the resulting folder is a local HDD folder or a gdfs path?
  • Do you have any network or GDFS folder included in the path environment variable?
  • Were you able to reproduce the issue even after a restart? I am suspecting a connectivity issue?

It would be perfect if you had a clean VM around so you could send me the steps to setup a repro environment for this issue... As I said, choco install gsudo + google-drive-file-stream connected to my account wasnt enough to make those warnings appear.

Thanks

@kiberdruzhinnik
Copy link
Author

The Error: The operation was canceled by the user is just because you clicked on no on the UAC popup, right?

Absolutely right. It is not the problem.

Whats the outcome if you use 'gsudo' instead of 'sudo'? also use gsudo --debug cup all for more detailed info please.

By the way, gsudo works like a charm, here is the screenshot.
image

Whats the output of where sudo in cmd? the resulting folder is a local HDD folder or a gdfs path?

image

Do you have any network or GDFS folder included in the path environment variable?

No network or GDFS folder included as far as I see.

Were you able to reproduce the issue even after a restart? I am suspecting a connectivity issue?

Perfectly reproducible each time using "sudo" command but not "gsudo".

It would be perfect if you had a clean VM around so you could send me the steps to setup a repro environment for this issue... As I said, choco install gsudo + google-drive-file-stream connected to my account wasnt enough to make those warnings appear.

Unfortunatelly, right now I have no time to investigate it more, maybe some time later.

@gerardog
Copy link
Owner

That's very informative, thanks.

So what I got is:

  • this is related to the sudo symbolic link

  • it's happening after Debug: Elevating Process and before the cancelled exception, so it is in this method

  • so, the warning is written inside .NET Process.Start method (with RunAs Verb) which is a .NET/Windows OS area, probably then inside some GDFS hooked code...

  • this is more likely a GDFS problem triggered when doing RunAs on a SymLink, which is not a very common scenario. It may be worth to report to google. You might be able to reproduce this by running this from a non-elevated powershell: Start-Process -verb RunAs Sudo -ArgumentList "cup all".. In my setup it's not, but if in you computer it does the warnings, then you could create another symlink, like cmd /c mklink NotepadSymLink.exe C:\windows\notepad.exe and then Start-Process -verb RunAs NotePadSymLink, that, if it warns, is a non-gsudo-repro-case to report to google team.

Nonetheless, gsudo should have detected the symlink and tried to elevate the gsudo exe instead of the sudo symlink. That is something I can fix and should probably eliminate the warnings.

@gerardog
Copy link
Owner

gerardog commented May 29, 2020

I was able to reproduce this problem locally, I think because after a while I am now logged off from GDFS. Will confirm you if the warnings are gone after the fix.

@gerardog gerardog mentioned this issue Jun 12, 2020
@gerardog gerardog changed the title Warnings using gsudo with Google Drive FS Canusing gsudo with Google Drive FS Mar 8, 2024
@gerardog gerardog changed the title Canusing gsudo with Google Drive FS Cant connect to socket` using gsudo with Google Drive FS Mar 8, 2024
@gerardog gerardog changed the title Cant connect to socket` using gsudo with Google Drive FS Can't connect to socket using gsudo with Google Drive FS Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants