-
Notifications
You must be signed in to change notification settings - Fork 13k
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
On permission managed windows machines (eg. win7) rust generated binaries require administrator privileges to run #16455
Comments
There may not be anything we can do about it since it seems this is just what happens when you build from cmd.exe: http://discuss.rust-lang.org/t/prioritizing-windows-issues/319/9?u=brson |
V01D_EXE only says that this happens when you build a program from an elevated |
I am able to build C++ programs from an elevated visual studio and then run them non-elevated just fine. So, it is definitely possible to fix this, it might just be mingw's fault instead of our fault. |
@brson
Under Windows 8/8.1 this is no problem as Windows generally adds permissions for On It had happened to me on older windows as well. I have no idea how to fix it properly for RUST, but @retep998 it should not be a direct fault of mingw because I use MinGW with/without elevated permissions , and have no problem. The problem is of Windows. Visual Studio generates no problems as it is made specifically for windows so it takes care of everything. Hope this helps as I am also a windows user , and everyone of us wants |
This issue would most likely be solved once we provide proper support for manifests. rust-lang/rfcs#721 |
@V01D-exe, Is this a file permissions problem, i.e. only the file creator has rights to execute it? |
@vadimcn |
@V01D-exe, Would you mind describing your setup, so I could try to reproduce the problem locally? Have you tried adding a manifest to your executable? |
@vadimcn First -
Second - Compiled using Third - Used mt.exe from Windows SDK to embed the manifest manually into the exe.
Fourth - From a non-elevated cmd, start a.exe . => a.exe automatically starts up in elevated cmd. Fifth - Change NOTE : Since I have admin access on my PC, someone needs to check this in a permission managed machine, if it works or not. PS: BTW, this problem was described by user shadowmint here, I don't have this issue since I am on windows 8 with admin access. |
So I notice that we don't even have a tracking issue for this. See this comment #11207 (comment) |
We need to add proper manifest for Windows any way. I am thinking about would it be possible that we take manifest as a crate in some way. |
cc @vadimcn |
@bombless: perhaps so, but it is not clear at all that this particular issue is caused by the absent manifest. |
@vadimcn |
@vadimcn Since no one is having this problem, i think this should be either closed down, or a reproduce tag should be added. |
Triage: not aware of any specific movement on this front. |
Triage: not aware of any changes. Given that this is solved by proper manifests, and nobody has commented since 2015, i'm going to close this as a duplicate of rust-lang/rfcs#721 |
minor: Remove Changelog: XXX title from Github release notes Fixes rust-lang#16455 Closes rust-lang#17165
From http://discuss.rust-lang.org/t/prioritizing-windows-issues/319/2?u=brson
It appears that on permission managed windows machines (eg. win7) rust generated binaries require administrator privileges to run, even for trivial case applications like println!("Hello World"); these permissions must be accepted ("Run this as administrator") every time the application is launched.
I have no idea how this is typically managed in win programming, but having to accept "run this as administrator" every time you run cargo test or launch a binary is really tedious.
The text was updated successfully, but these errors were encountered: