0

I am working on a Java project together with other developers, all using macOS. As a part of its functionality, the code in this project needs to edit local /etc/hosts file which requires root user access. To accomplish that, we all run the IDE (IntelliJ) as root which creates a bunch of inconveniences.

I am really keen to find another solution to this problem. I had an idea to maybe somehow use a local environment variable (perhaps managed in IDE profile or something) but I am not sure how to do that.

Any ideas\suggestions how I can solve this problem?

Eugene S
  • 6,709
  • 8
  • 57
  • 91

1 Answers1

0

Hope u have got the solution, But this answer might help others. Starting interllij using command sudo ./idea.sh will fix this issue. After staring the IDE use su - <current user> to switch back to the current user.

Note : u have to give the root user privilages to the current user. for that follow this link

dijo francis
  • 153
  • 1
  • 2
  • 15