how to access file by visudo from non root user , or other option
for example
when we change user to hdfs and from user hdfs we want to print the file - file.cfg we get Permission denied
how to configure the visudo in order to get read access from user - hdfs ( and without to use sudo command )
# su hdfs
$ whoami
hdfs
$ pwd
/opt/home/security
$ cat file.cfg
cat: sec.cfg: Permission denied
$ ls -ltr
file is ended with dot:
-rwxr-----. 1 root root sec.cfg
expected output
# su hdfs
$ pwd
/opt/home/security
cat file.cfg
app_q 384273462 pass BHYVF^GTYR&GV@yhgb2yr