How to increase or decrease the capabilities of the current process in golang?

I use the toolkit github.com/syndtr/gocapability in golang to change the capabilities of the current process. The information obtained through the caps.String() function shows that the capablilities have changed.

The code link: https://play.golang.org/p/SkJYyNeFrW0

But in fact it doesn’t. For example, I want to create a new file in the /dev folder (it doesn’t make sense to do so, it’s just an experiment),and then I didn’t get the permissions. It can also be seen from the information in /pro/pid/status that capablilities has not changed. How to increase or decrease the capabilities of the current process in golang? Is there any other method or package?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.