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

Trying to run CKAN as an administrator #3956

Closed
1 task done
mnh713 opened this issue Dec 14, 2023 · 26 comments
Closed
1 task done

Trying to run CKAN as an administrator #3956

mnh713 opened this issue Dec 14, 2023 · 26 comments
Labels
Support Issues that are support requests Windows Issues specific for Windows

Comments

@mnh713
Copy link

mnh713 commented Dec 14, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Operating System

Windows 10 home

CKAN Version

version before v. 1.33.2 update

Games

KSP 1

Game Version

1.12.5

Did you make any manual changes to your game folder (i.e., not via CKAN)?

no

Describe the bug

After selecting update Ckan to v.1.33.2 from the Ckan main page. Ckan closed and no longer will open

Steps to reproduce

removed Ckan from computer and re-download Ckan v. 1.33.2 and launch. Ckan still does not launch.

Relevant log output

No response

@HebaruSan HebaruSan added Support Issues that are support requests Windows Issues specific for Windows labels Dec 14, 2023
@HebaruSan
Copy link
Member

Hi @mnh713, which version of .NET Framework do you have installed? 4.8 is required to run the latest CKAN release, so you'll need to update that if you haven't already.

@mnh713
Copy link
Author

mnh713 commented Dec 14, 2023 via email

@HebaruSan
Copy link
Member

OK. And when you say it will no longer open, is there an error message?

@mnh713
Copy link
Author

mnh713 commented Dec 14, 2023 via email

@HebaruSan
Copy link
Member

HebaruSan commented Dec 14, 2023

Hmm, are you comfortable working from the command line? We might be able to capture more information like this:

  1. Start → run
  2. cmd
  3. cd to the folder where ckan.exe is
  4. ckan.exe --show-console --debug

That should cause the output from the terminal window to be shown in the window you opened. If any messages were printed before it was closed, it would remain visible instead of disappearing too quickly to read.

@mnh713
Copy link
Author

mnh713 commented Dec 14, 2023 via email

@HebaruSan HebaruSan changed the title [Bug]: Command window closes without GUI opening Dec 14, 2023
@mnh713
Copy link
Author

mnh713 commented Dec 14, 2023 via email

@HebaruSan
Copy link
Member

Ahh, if you're running as administrator, can you try not doing that?

@mnh713
Copy link
Author

mnh713 commented Dec 14, 2023 via email

@mnh713
Copy link
Author

mnh713 commented Dec 14, 2023 via email

@HebaruSan
Copy link
Member

Hi @mnh713, attachments don't come through GitHub's email interface. Can you share what you found in some other way?

@mnh713
Copy link
Author

mnh713 commented Dec 14, 2023 via email

@HebaruSan
Copy link
Member

Thanks. Do you have a non-administrator user on your PC that you could try this as?

@mnh713
Copy link
Author

mnh713 commented Dec 14, 2023 via email

@HebaruSan
Copy link
Member

OK, sounds good.

For what it's worth, CKAN should not be run as an administrator, but if you must do that, the --asroot parameter will allow it.

@HebaruSan HebaruSan changed the title Command window closes without GUI opening Trying to run CKAN as an administrator Dec 14, 2023
@mnh713
Copy link
Author

mnh713 commented Dec 14, 2023 via email

@mnh713
Copy link
Author

mnh713 commented Dec 14, 2023 via email

@mnh713
Copy link
Author

mnh713 commented Dec 14, 2023 via email

@HebaruSan
Copy link
Member

Glad you got it working!

@linuxgurugamer
Copy link
Contributor

@HebaruSan I wonder if it's trying to read/write a protected file? Maybe add some additional debugging statements around each attempted file access (try/catch) to be a bit more verbose?

@HebaruSan
Copy link
Member

@linuxgurugamer No, it's detecting that the user is an administrator, printing an error, and exiting.

@Armour9
Copy link

Armour9 commented Dec 31, 2023

I am having this error as well. I have uninstalled CKAN and have reinstalled it and I am getting the immediate popup and CKAN closes. When I did a quick screenshot is says because I am trying to run as Admin. I have ensured "run as admin" is unchecked. Now CKAN does not work at all.

@HebaruSan
Copy link
Member

I honestly have no idea what you mean by "try the --asroot parameter". I have googled it and nothing relevant came up. I am sure it is second nature to people that know about coding

How do I "try the --asroot parameter"?

Hi @Armour9, I'm replying here instead of on #3985 so other users who land on the original pinned issue can find it. Don't worry, it's nowhere near as complicated as coding! 😁 Here are some introductions to Windows shortcuts that show how you can set up command line parameters for use with programs:

In the case of CKAN, this is where you would put --asroot:

image

(This can also be done by typing in a cmd window, but shortcuts are the quickest way to get back into "click on icons" territory.)

Q: But isn't that annoying? Why do I have to do that?
A: Yes! Because you really should not run CKAN (or most other programs) as an administrator user! It removes important safeguards and gives a program far too much power to affect your computer. The --asroot flag is a solution for advanced users who understand the risks.

@QuackQuackZA
Copy link

So I just want to confirm, there is no way to run the app without administrator privileges? Did some googling and from what I understand is if the app doesn't have admin rights then it won't be able to read/write correctly and thus not work, i.e. running this app requires admin rights? If this is not the case, is it possible to strip the exe of privileges while still logged into the admin profile.

I found a cmd line that allows you to run an exe as another user (preferably as one without admin rights) with the "/runas <user_name>" command line, but this still requires that the non-admin user profile exists on the PC. I don't want to do that.

From what I see from the earlier "--asroot" flag post and mnh713's post that running it requires admin rights and exposing yourself to risk is unavoidable.

@HebaruSan
Copy link
Member

@QuackQuackZA no, you've misunderstood. CKAN does not need admin privs, and you should not run CKAN as admin. The whole point of this check is to catch it when someone does that.

@QuackQuackZA
Copy link

Thanks. Is the only way to do it, to create another user on your PC?

@HebaruSan HebaruSan mentioned this issue Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Support Issues that are support requests Windows Issues specific for Windows
Projects
None yet
Development

No branches or pull requests

5 participants