Running GoLand with POSIX Capabilities

I'm using GoLand to write some code that listens on IP addresses that require specific POSIX capabilities to be set for the process (specifically, the CAP_NET_RAW capability). If I run the program and/or tests from the command line with sudo everything works fine, but I don't want to lose my ability to debug directly in the GoLand IDE and I don't want to run GoLand as root all the time. I tried using setcap to set the POSIX capabilities on the goland.sh script, but the capabilities aren't propagated through when the script launches Java. What's the best way to give my GoLand process specific POSIX capabilities? Thanks!

1 comment
Comment actions Permalink

Hi,

At the moment, there is no way to do this :(

As an alternative way for debugging, I can suggest running an application in the real terminal and using Attach to process functionality that we introduced in GoLand 2018.1: https://blog.jetbrains.com/go/2018/02/22/goland-2018-1-eap-4-is-here-partial-commits-for-git-attaching-debugger-to-local-processes-and-more/

0

Please sign in to leave a comment.