I want to help develop a personal web server project and I'm running into an issue with the project lead.
I thought I finally figured out the problem of the project needing root privileges by adding 'gksu' to every shell command I encountered. However, the project lead has explained to me that the personal web server project needs heaps more root privileges than just the couple I altered, so that it's best I simply run the project(s) as root.
But I have read time and time again here that running eclipse in root is ill advised. I've tried running the PyDev project as an external tool, putting gksu in front of the python command, but it immediately stops at the first import that references to one of the sub projects.
So my question is what my best option is. Starting eclipse in root? I've had problems with that. It's been a while, but I think the problem was something like if you would add files it would be owned by root and thus inaccessible or unuploadable to the repo or something, though if this really is the only option, I'm willing to try again and will come back with the real issue again.
I think one option would be just making the interpreter run as root, while not actually running Eclipse as root.
The trick here is that the Python interpreter can be any shell script, not only the actual Python executable, so, you can create a bash script as:
#!/bin/bash
source $HOME/.config_pydev.bash
python "$@"
and specify that bash script as the Python interpreter (and create a $HOME/.config_pydev.bash to make whatever you need to be able to run your service, such as becoming root).
Note that this requires you to become root without any prompt at .config_pydev.bash -- or you can put gksu before the python "$@" call.
As for running eclipse as root, it should also be possible, but then, you have to do everything as root (including setting your git user credentials in the root account -- and I'd suggest re-cloning all the repositories under that account too, the problems arise when you mix things with your account and the root account).
Still, as noted, being root all the time isn't really advised, but sometimes, practicality beats purity (I'd say that running a webserver as root is much more dangerous than running Eclipse as root, so, I think in your use case, you already have something worse anyways).