I have written a Linux system wide C++ program /usr/bin/PROG_X
that uses a configuration file /etc/PROG_X.conf
and log file /var/PROG_X.log
.
Now I need to call this program, after strong authentication, from the web using apache web server and php. Calling the program may involve changing configuration files and will change, of course, log files.
I am interested in keeping SELinux enabled.
My Querstion is: What user/group and what file permissions should be set for the binary file, configuration files and log files for proper and secure operation?