Linux run as root license server does not recognize me.

Answered

I use a corporate license server. When I run IJ products using my username all is fine.

However I need to run goland as root in order to debug my program (the program needs root privs) but then the license server does not recognize me anymore. Evaluation period expires and I no longer can debug as root.

How do you fix this problem?

 

0
8 comments

It happens due to IDEs use your home directory to store the settings as well as license ones. When you run IDEs as a root user, IDEs using the root's home directory and GoLand can't find your license server data, and I suppose another IDE settings. You can try to run the IDE instance as sudo again and change IDE paths to your user home directories using Help | Edit Custom Properties action and specify the following entries with absolute paths: https://www.jetbrains.com/help/go/tuning-the-ide.html#idea.config.path

Keep in mind you will need to modify this file anytime you install a new version.

Please, pay attention that you can configure the elevation period via Settings/Preferences | Appearance & Behavior | System Settings | Process Elevation and run your process as sudo via Run | Edit Configurations | Run with sudo option. It is enough for most cases with sudo authorization.

0

When you sudo, your username becomes root, which is not what is in the license file.

0

I have tried this thing with the config file. It didn't work. On top of that Goland lost all UI settings for root and didn't pick up the ones from my user. Are you sure this thing works on recent versions?

0

Yes, it works in the latest versions of GoLand. Your idea.properties entries should look like:

idea.config.path=/home/username/.config/JetBrains/GoLand2021.2
idea.system.path=/home/username/.cache/JetBrains/GoLand2021.2
idea.plugins.path=/home/username/.local/share/JetBrains/GoLand2021.2
idea.log.path=/home/username/.cache/JetBrains/GoLand2021.2/log

If you didn't specify these paths, GoLand uses the following ones:

idea.config.path=/root/.config/JetBrains/GoLand2021.2
idea.system.path=/root/.cache/JetBrains/GoLand2021.2
idea.plugins.path=/root/.local/share/JetBrains/GoLand2021.2
idea.log.path=/root/.cache/JetBrains/GoLand2021.2/log 

What paths have you specified? Could you please collect the IDE logs (from root user) via Help | Collect Logs and Diagnostic Data and upload them to https://uploads.jetbrains.com/, provide its ID?

0

idea.config.path=/home/skostov/.config/JetBrains/GoLand2021.1
idea.system.path=/home/skostov/.cache/JetBrains/GoLand2021.1
idea.plugins.path=/home/skostov/.local/share/JetBrains/GoLand2021.1
idea.log.path=/home/skostov/.cache/JetBrains/GoLand2021.1/log

Do you think I can press Help | Collect Logs and Diagnostic Data  from this screen?!

 

0

You can navigate to /home/username/.cache/JetBrains/GoLand2021.1/log and upload idea.log file.

0

Upload id: 2021_08_05_5bWc6D9rAm1gJcSB (file: idea.log)

0

I see that the IDE pick-up your settings correctly. Usually, "Ticket obtaining prohibited" means that you have configured user permissions on the license server for a particular username, and you don't have access to the license server from the root user. Please, contact your license server administrators.

0

Please sign in to leave a comment.