Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upOn permission managed windows machines (eg. win7) rust generated binaries require administrator privileges to run #16455
Comments
brson
added
the
A-windows
label
Aug 12, 2014
This comment has been minimized.
This comment has been minimized.
|
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 |
This comment has been minimized.
This comment has been minimized.
|
V01D_EXE only says that this happens when you build a program from an elevated |
This comment has been minimized.
This comment has been minimized.
|
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. |
This comment has been minimized.
This comment has been minimized.
ghost
commented
Aug 20, 2014
|
@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 comment has been minimized.
This comment has been minimized.
|
This issue would most likely be solved once we provide proper support for manifests. rust-lang/rfcs#721 |
This comment has been minimized.
This comment has been minimized.
|
@V01D-eXe, Is this a file permissions problem, i.e. only the file creator has rights to execute it? |
This comment has been minimized.
This comment has been minimized.
ghost
commented
Feb 22, 2015
|
@vadimcn |
This comment has been minimized.
This comment has been minimized.
|
@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? |
This comment has been minimized.
This comment has been minimized.
ghost
commented
Feb 22, 2015
|
@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. |
This comment has been minimized.
This comment has been minimized.
|
So I notice that we don't even have a tracking issue for this. See this comment #11207 (comment) |
This comment has been minimized.
This comment has been minimized.
|
@V01D-eXe: I assumed that you are experiencing this problem as well because of your comment here. |
This comment has been minimized.
This comment has been minimized.
|
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. |
This comment has been minimized.
This comment has been minimized.
|
cc @vadimcn |
This comment has been minimized.
This comment has been minimized.
|
@bombless: perhaps so, but it is not clear at all that this particular issue is caused by the absent manifest. |
This comment has been minimized.
This comment has been minimized.
ghost
commented
Feb 22, 2015
|
@vadimcn |
This comment has been minimized.
This comment has been minimized.
ghost
commented
Feb 23, 2015
|
@vadimcn Since no one is having this problem, i think this should be either closed down, or a reproduce tag should be added. |
This comment has been minimized.
This comment has been minimized.
|
Triage: not aware of any specific movement on this front. |
Mark-Simulacrum
added
the
C-bug
label
Jul 21, 2017
This comment has been minimized.
This comment has been minimized.
|
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 |
brson commentedAug 12, 2014
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.