-1

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
jango
  • 59
  • 2
  • 3
  • 12

1 Answers1

0

Check your file permissions unless user hdfs is in group root.

Add read permission to others with chmod 0744 /opt/home/security/file.cfg or add your user to group root.

deagh
  • 2,019
  • 5
  • 19
  • 19