I have a command-line tool that I'm creating and I'm looking for a safe place to put my sqlite database so it doesn't get overwritten or deleted by the user by accident in mac,windows,or linux and be accessible by my application.
1 Answer
Your tool runs with the permissions of the user. Any file created by it can also be delete by the same user.
You can ask the administrator to protect your files, but on most Mac/Windows/Linux PCs, the user is the administrator.
There is no place that is safe from the user that controls your tool's execution environment.
For that matter, no software is safe against users with access to the hardware:
“If you don’t open that exit hatch this moment I shall zap straight off to your major data banks and reprogram you with a very large axe, got that?”
― Douglas Adams, The Hitchhiker's Guide to the Galaxy