I recently received a project, and I am wondering how to do something in the right and safe way.
The situation is as follows:
Classes exist for managing Linux users, mysql users and databases, and apache virtual hosts. They are used to automate adding users to a small shared hosting environment. These classes are then used in command line scripts to offer a good interface for the system administrator.
Now I am asked to create a simple web interface to provide a graphical interface to the administrator, and then offer some functions directly to users (change their unix password and other daily routines).
I do not know how to implement a web application. It will be launched in Apache (with the Apache user), but classes should have access to files and commands that can be used by the root user only to make the necessary changes (for example, useradd configuration files and virtual hosts). When using command line scripts, this is not a problem since they are run under the correct user. Granting permissions to the apache user is likely to be dangerous.
What would be the best way to resolve this through a web application? I would like to use classes directly if possible (this would be more convenient than invoking command line scripts such as external processes and parsing), but I cannot figure out how to do this in a safe way.
, (webmin, eBox,...), , .
PS: , . PHP, python. Django -.
, .
EDIT: webmin , -- ( miniserv.pl). . , , . - Django? ? - CherryPy?