I have a file on a ubuntu server which should only be accessible from one user. There are other users on the server with sudo permissions. I am trying to restrict the access of this file despite another user can just sudo to see/modify the contents.
I've looked into visudo
which I've disabled chmod
and chown
commands. So the user cannot change the file permissions. I've looked into an access control list and from my understanding it's it would be able to be bypassed with sudo.
So my question is, how can I restrict the access to a file by one and only one user. Without having the ability to sudo in the bypass the permissions.