I have a CentOS 7.9 machine, logging in as my normal user account and access a directory that has my forms and SSN in it. Other users in the network who has the root account can ssh to my box and access these files (Everyone can ssh to any machine on the network and become root). How can I prevent them from doing so?
Does this answer your question? System Integrity Protection for Linux– Artem S. TashkinovMar 21, 2022 at 13:42
You can prevent root from being able to see the content of your file(s) by encrypting them. Root users will still be able to delete and/or tamper with your files.– G-Man Says 'Reinstate Monica'Mar 23, 2022 at 8:13
Note what you describe as "remote root user" actually is a "local root user" that logged in from remote. Once logged in, "root == root", so you probably want to prevent root login by others.– U. WindlMar 30, 2022 at 13:14
root, or more specifically the user which has User ID 0 can have access to any directory, you cannot restrict the access for this user.
You do not hide your files from the root.
You prevent non-trusted people to become a root on your machine.