How to verify that all files are intact prior to install?
https://softwareengineering.stackexchange.com/questions/155513
-
04-11-2019 - |
Question
I'm working on my CMS (in PHP platform) for a long time now. The main program is done and I'm currently developing the Installer part. Installation itself will be fairly simple:
- Upload all files
- Verify that the "content/" dir has correct permissions
- Check if ALL files are intact and not modified [This is the subject of this question]
- Insert the config data and first settings
- Run install (Generate all DB tables and insert sample data etc.)
Now the question-mark is at step 3. How do I verify ALL files? Verification itself should compare all CMS root-directories files against a list from remote location. List should contain filename, filesize and filetype. This way the user can check, that there are no unnecessary or corrupted files, that could indicated a breach in the software.
I have seen some software installers do that, but I cannot find any right now and there for I'm clueless on the most optimal method for this. Of course there always is a simple array
trick, but there surely must be a better and faster method?!
No correct solution