Score:0

How can I setup an encrypted directory where root cannot see by sudoing to my user but sftp can?

cn flag

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?

Score:0
us flag

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.

cn flag
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?
cn flag
E.g. with an environment password that a new user wouldn't have.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.