Je n'ai
pas proposé de sudo chown root:root mon-fichier, mais l'équivalent de
chmod 400 mon-fichier
- -
.
Si cela ne suffit pas, il vaut le coup d'essayer
chattr +i
man chattr
A file with the 'i' attribute cannot be modified: it cannot be deleted or renamed, no link
can be created to this file and no data can be written to the file. Only the superuser or
a process possessing the CAP_LINUX_IMMUTABLE capability can set or clear this attribute.
-V Be verbose with chattr's output and print the program version.
D'où :
sudo chattr +i -V mon-fichier
Remarque : mon-fichier reste propriété de l'utilisateur.
On annule (en cas de besoin) par :
sudo chattr -i -V mon-fichier