give permission to read a file

I want to give tester only the account tester to view the file /var/mail/root nobody else but him and of course the owner root w/o changing the permisions of /var/mail/root -rw-------.

[tester@adminserver ~]$ cat /var/mail/root
cat: /var/mail/root: Permission denied

Maybe try it via sudo.

may i know how?

You could check the man page for sudo on your system, if it is installed or also search the web, as a start showing your proactive search for a solution :wink: There is an official sudo page which explains everything also.

Example:

Edit the sudoers file to your needs using the command "visudo". For more help check the mentioned sites. It should have this line for the example output down there:

Cmnd_Alias DO = /bin/cat /data/tmp/testfeld/bla
tester localhost = NOPASSWD:DO
-rw------- 1 root root     5 2009-01-29 12:59 bla
tester@isau02:/data/tmp/testfeld$ cat bla
cat: bla: Keine Berechtigung
tester@isau02:/data/tmp/testfeld$
tester@isau02:/data/tmp/testfeld$ sudo /bin/cat /data/tmp/testfeld/bla
yoyo