I have a standard user on a remote Ubuntu server where I code and I'd like to keep some of my files private from a "sudo myuser" by root. (E.g. config files) Those files would also have to be accessible for when the IDE deploys to the remote account (which is done by sftp). Is this possible?
Asked
Active
Viewed 79 times
1 Answers
0
This is not possible to solve in the way you are trying. The root user has full access to everything on a system, and there is no way to change this.
What you probably need to do is remove the ability of other users to become root. This question has details of how to achieve this. Take care though: remember that you will always need one user who can become root (or to set a root password) otherwise you will be unable to maintain your system.

nickcrabtree
- 1,194
- 11
- 19
-
I was thinking something around virtual filesystems that I can mount with a password and another instance of my user won't see them. Is this a wrong direction? – vaidab Nov 20 '21 at 19:27
-
E.g. with an environment password that a new user wouldn't have. – vaidab Nov 21 '21 at 08:33