If I have a file with permissions and ownership like:
-rw------- 1 root root
, is this file encrypted?
I am asking this because I am wondering how the file is really protected against being read as plain bytes and then reconstructed by some non-root user, or by an attacker.
Best Answer
No. The file is still what the file is. If someone reboots into a live session the file is visible by ANY user that does the reboot. Same if someone takes out the harddisc and mounts it into another system where they are admin.
An encrypted file would be inaccessible however the method you would use.
All
-rw------- 1 root root
does is make a file readable and writable by a user "root" and not by the group "root" and not by "others". Pretty strict but not good enough if you never want someone to pry into it.The ONLY working method to prevent access by anyone on a system is not storing the file on that system.