On shared unix hosting, if I have a file sensitive-data.txt and I issue:chmod 600 sensitive-data.txtCan root user still read my file?  Specifically I'm wondering if it's safe to store my password in mercurial hgrc file.UPDATEDecided to use the mecurial keyring extension as it was super easy to setup:pip install mercurial_keyringand then add to hgrc:[extensions]mercurial_keyring =However I'm still interested in the answer to this question.
Can root/superuser read my read-protected files?
permissions;security;root
Yes, root can:$ echo Hello you\! > file$ chmod 600 file$ ls -l file-rw------- 1 terdon terdon 11 Feb 27 02:14 file$ sudo -i# cat fileHello you!In any case, even if root couldn't read your files as root, they can always log in as you without a password:$ whoamiterdon$ sudo -i[sudo] password for terdon: # whoami root# su - terdon$ whoamiterdonSo, root can change to any other username using su (or sudo -iu username) and will then be able to do anything at all as though they were you. 