编辑Web根目录之外的文件

I have developed a python desktop application and application itself having setup page to change some configurations in the application and it is saved as a configuration file.

Now I need do to give web interface to change those configurations by using web browser remotely. But I need to change the same configuration file.

I can’t access any file outside the web root, So My first question is how can I edit that file which is located outside the web root.

more info : for web application I use LAMP stack and desktop application is python based.

someone suggest me to use CGI, Second question : Is that possible, if it is possible how I can I do it?

Probably by bind mounts (assuming Linux), so that the file is in it's original location as well as in the web root.

Or by priviledge separation. The web root sends a query to some worker job, that has access to all the needed files.