For reasons, I need to read /root/.ssh/authorized_keys
with a user who hasn't the right to read it. Obviously, I can't change the rights (nor the ACL) of the file, because ssh wouldn't like it.
I access to the file using Python:
try:
with open("/root/.ssh/authorized_keys",'r') as f:
foo()
except EnvironmentError:
print 'Bad permissions and/or file not existing'
The python script will be executed by an unprivileged user with sudo
. What are the minimal permissions I have to put in the sudoers
file to allow the script to read the file?