I am working on a web interface (access only through intranet and not through internet). On clicking a button in the PHP page, a Python script does a few things and in the end, it needs to execute cp command as root.
I searched through different solutions and decided to adopt the one which suggested to give password-less sudo access to the apache user just for the /bin/cp command. So, I edited the sudoers file to give sudo access to apache without a password just for cp command and it worked fine. But, the next day I found that the line which I added was itself missing. I am not sure if some regular update takes place which overwrites the sudoers file.
Please help me figure out a possible solution to this problem.