-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Elevation error #289
Comments
@loranger That's strange, I'm thinking you could have some weird Can you try running the sudo open path/to/Etcher.app Does that work? |
Thanks for you reply, @jviotti I'm afraid it doesn't work either. |
Hi @loranger This is indeed something I never saw before. The fact that even explicitly running the Can you the following gist: https://gist.github.com/jviotti/a97604a30c5e025430930e14c15f4e4d? Assuming you have NodeJS installed: cd path/to/gist
npm install And give it a go with and without node app.js
sudo node app.js I get |
I get the same result as your :
(It sounds good, isn't it ?) |
@loranger Yeah, looks good. I suspect this might be an issue with the module we're using to provide the elevation dialog ( Can you try running the following gist now and see what it outputs? In my Mac, the script successfully returns "root". |
Another good experiment to make would me replacing the var sudo = require('sudo-prompt');
sudo.exec('node -e "console.log(process.getuid())"', {
name: 'Sudo Prompt Test'
}, function(error, stdout, stderr) {
if (error) {
throw error;
}
console.log('STDOUT: ' + stdout);
console.error('STDERR: ' + stderr);
}); Notice that if you ran the dialog once and it succeeded, the sudo session will be cached and you might get inaccurate results. I recommend running |
I'm sorry but the last gist does not work :
The graphical sudo did prompt, and I filled it, but it ends with this error. Then I tried with the
|
By the way, here is my environment : node version: v5.10.1 |
Hi @loranger , That's great news. At least we know the issue is in sudo-prompt. I'm not very familiar with the internal workings of this module, but @jorangreef, the author, might be able to provide some insight. I encourage you to create a new issue in that module, explaining what happens, describing your platform and linking back to this issue, so I can stay involved and hopefully be able to help further. |
Thanks @loranger, would you please test the following on that machine:
Does step 7 ask for your password? |
@jviotti Thanks for your support, I've created a ticket in the sudo-prompt repository. @jorangreef Thank you for digging in my issue. I did run your test, and yes the step 7 did ask for my password. Is my issue related to the OS X 10.10.5 kernel local privilege escalation issue I did fix by adding a |
Yes, if step 7 asked for your password it's because |
Awesome, thanks for the great help @jorangreef. Let me know if there is anything I can collaborate with on that issue. |
Thanks @jviotti, I made a few major changes in jorangreef/sudo-prompt@0b5c7d7, would you mind testing on OS X (with and without |
Hi @jorangreef, Thanks for the quick fix. I've tested this in OS X. It works fine with and without Maybe you can preserve the current working directory? I don't have access to a Linux box atm, but will post back my results probably later today. |
I borrowed an Ubuntu 14.04 AMD64 laptop, and I confirm it works fine there as well. |
Thanks @jviotti, I added a commit to preserve the cwd on OS X. It may or may not always be the case on Linux. I would like to test the various binaries on Linux further in future to address this properly. Perhaps we can use the same applet.app sub-shell approach for Linux that we are now using on OS X (see sudo-prompt-script within the MacOS directory of the applet). That should make it possible to support setting custom ENV variables and cwd via options. |
@jorangreef I confirm OS X is working fine with relative paths again. The sub-shell approach makes sense for Linux as well. We don't use |
Fixes: #289 Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
Fixes: #289 Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
Hello,
On OSX 10.11.4 I cannot launch Etcher : As soon as it starts, I am prompted for root password, but l ways get back an Elevation error :
User did not grant permission
(which I did)
The text was updated successfully, but these errors were encountered: