Security Question: Overwriting Remote Files
I'm writing an administrative panel and I want to store some of the information they enter into a text file for use in a script. What I don't want is for someone to start accessing those files and changing the data. The script can be used by any number of my clients so the files need to be secure.
开发者_如何学JAVAAre files safe from a remote edit? Is it even possible to overwrite a file remotely (such as with fwrite())? I'm not concerned about people reading the files (data is publicly viewable), just overwriting or editing them in any way. If they aren't safe, how can I secure them?
If you're storing data for administration purposes, why would you not care if anyone could read them? Surely you wouldn't want one set of clients to read another set of clients data?
The script can be used by any number of my clients so the files need to be secure.
Your definition of "secure" is vastly wrong.
Why not store the data in a database, allowing clients only to manipulate their own data via the administration panel?
Turns out most servers protect against someone using fwrite() from a remote location, so I don't have a problem.
精彩评论