linux - Securely Allow PHP Read & Write Access to System Files -


I can not find solid information to allow php to be configured on preferred (best practices) and / or secure methods I am not in the public web directory or the other type of files are not owned by the user, so I am hoping to find some answers here.

I am a fairly capable PHP programmer, but it is faster to write web applications (most of which are not publicly available through the web), which are some services or applications on the server Requires updating, changing or adding config files or files created by

For example, I need to create a web interface that will see, add, or remove entries from the root /etc/mail/spamassassin/white-list.cf file.

Another scenario is that I need PHP to parse the user mime message in / var / vmail in the ownership of Vimal.

These are just some examples, other files owned by other processes may have other files. How can I access those files safely and manipulate these files without opening the risk of security? How do I write PPL applications? I / O

There is a need to implement something like this, I might do something right I will not be a Linux CLI expert by using the sudo for this, so I'm sure there are issues that I have not taken into account while typing it.

Maybe I will decide which work needs to be done, and write a different script for each job, which needs to be completed. By using sudo , I assign the required level of permissions for that script.

Obviously, the number of tasks has increased, so it will involve complexity and the amount of work involved. I'm not sure how this will affect you at this time.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

lua - HowTo create a fuel bar -