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

[Bug] GUI fails silently trying to set up a new instance if it doesn't have write permissions #3330

Closed
DasSkelett opened this issue Mar 23, 2021 · 1 comment · Fixed by #3332
Labels
Bug Something is not working as intended GUI Issues affecting the interactive GUI Linux Issues specific for Linux macOS Issues specific for macOS

Comments

@DasSkelett
Copy link
Member

Background

  • Operating System: Linux & macOS, might affect Windows as well
  • CKAN Version: v1.30.1

Have you made any manual changes to your GameData folder (i.e., not via CKAN)?
No

Problem

Describe the bug
CKAN fails silently if it doesn't have write permissions to the KSP directory.
Exception can only be seen if run from terminal.

Steps to reproduce

  • Install KSP as one user (or chown -R 1999:1999 <path to existing KSP>)
  • Open CKAN as another user that doesn't have write access to the KSP directory
  • Try to add this KSP instance to CKAN
  • If you do this during the initial game instance selection dialog (if you have no default instance set), CKAN crashes completely, without any message
  • If you do this while another instance is already loaded, using the "File > Manage game instances" option, the file selection dialog closes but nothing else happens.

Expected behavior
CKAN should show an error message that it can't setup its files due to permission problems

CKAN error code (if applicable):

System.UnauthorizedAccessException: Access to the path '/ram/Fake-1.11.1/CKAN' is denied. ---> System.IO.IOException: Keine Berechtigung
--- End of inner exception stack trace ---
at System.IO.FileSystem.CreateDirectory (System.String fullPath) [0x00191] in <673b2a9c49de4736b9b01249f8d6d6b1>:0
at System.IO.Directory.CreateDirectory (System.String path) [0x0002c] in <673b2a9c49de4736b9b01249f8d6d6b1>:0
at ChinhDo.Transactions.FileManager.TxFileManager.CreateDirectory (System.String path) [0x0001b] in <bd256a5f4bd9434c90d5e776dca9de7b>:0
at CKAN.GameInstance.SetupCkanDirectories (System.Boolean scan) [0x0006e] in <bd256a5f4bd9434c90d5e776dca9de7b>:0
at CKAN.GameInstance..ctor (CKAN.Games.IGame game, System.String gameDir, System.String name, CKAN.IUser user, System.Boolean scan) [0x0007e] in <bd256a5f4bd9434c90d5e776dca9de7b>:0
at CKAN.GameInstanceManager.AddInstance (System.String path, System.String name, CKAN.IUser user) [0x00053] in <bd256a5f4bd9434c90d5e776dca9de7b>:0
at CKAN.ManageGameInstancesDialog.AddToCKANMenuItem_Click (System.Object sender, System.EventArgs e) [0x0005f] in <bd256a5f4bd9434c90d5e776dca9de7b>:0
System.UnauthorizedAccessException: Access to the path '/Applications/Ksp/Kerbal Space Program 181/CKAN' is denied. ---> System.IO.IOException: Permission denied
@DasSkelett DasSkelett added Bug Something is not working as intended GUI Issues affecting the interactive GUI Linux Issues specific for Linux macOS Issues specific for macOS labels Mar 23, 2021
@HebaruSan
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is not working as intended GUI Issues affecting the interactive GUI Linux Issues specific for Linux macOS Issues specific for macOS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants