If I understand correctly, you are in a situation where multiple people share the same account on a computer -- that is, not only will they run the same emacs
binary, they also have the same home directory where Emacs searches for the .emacs
file.
It seems like you not only want to prevent others from reading the .emacs
file, you actually don't want them to be able to run emacs
at all.
Unfortunately for you, Emacs can be started with -q
or -Q
in which case the .emacs
file is not evaluated at all. Thus any "protection" that relies on your .emacs
file can easily be circumvented.
How about restricting access to the emacs
binary instead? Maybe make it only executable for members of a certain Unix group (which of course is pointless if multiple people share the same account), or something along those lines. But note that this will not prevent them from installing their own local copy of Emacs.