Support Questions
Find answers, ask questions, and share your expertise
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

ambari-agent permission denied


ambari-agent permission denied


Dear community


I have installed iâmabri server on a centos7 machine : 2.4.7 

it is up and running

I have installed an ambari agent but I got Permission denied

I am using a root user :

[root@luapp698 bin]# sudo ambari-agent status
bash: /var/lib/ambari-agent/bin/ambari-agent: Permission denied

Is there some wrong configuration that I have made during install?

I have the same issue on all the other nodes

Please assist

Thanks and Regards


Re: ambari-agent permission denied

Rising Star

@asmarz - It seems like you are running ambari agent with root user. While starting the ambari-agent you are getting permission denied. Can you confirm, if root user have proper permission on the directory. I will suggest you to check the path like below:


# ls -ld /var/

# ls -ld /var/lib/

# ls -ld /var/lib/ambari-agent/

# ls -ld /var/lib/ambari-agent/bin/

# ls -ld /var/lib/ambari-agent/bin/ambari-agent

Re: ambari-agent permission denied


Thank you for your reply 


login as: root
root@server2's password:
Last login: Wed Nov 13 17:29:29 2019
[root@server2~]# ls -ld /var/
drwxr-xr-x. 20 root root 282 Nov 7 13:47 /var/
[root@server2 ~]# ls -ld /var/lib/
drwxr-xr-x. 31 root root 4096 Nov 13 11:52 /var/lib/
[root@server2 ~]# ls -ld /var/lib/ambari-agent/
drwxr-xr-x 10 root root 267 Nov 13 11:52 /var/lib/ambari-agent/
[root@server2 ~]# ls -ld /var/lib/ambari-agent/bin/
drwxr-xr-x 2 root root 26 Nov 13 11:52 /var/lib/ambari-agent/bin/
[root@server2 ~]# ls -ld /var/lib/ambari-agent/bin/ambari-agent
-rwxr-xr-x 1 root root 10751 Aug 22 02:11 /var/lib/ambari-agent/bin/ambari-agent
[root@server2 ~]#


However, I have this 

# /etc/fstab
# Created by anaconda on Thu Nov 7 12:40:54 2019
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
/dev/mapper/centos-root / xfs defaults 0 0
UUID=656e7855-a771-474b-b53d-7b69fc4f0d67 /boot xfs defaults 0 0
/dev/mapper/centos-home /home xfs nodev 0 0
/dev/mapper/centos-tmp /tmp xfs nodev,nosuid,noexec 0 0
/dev/mapper/centos-var /var xfs nodev,nosuid,noexec 0 0
/dev/mapper/centos-var_log /var/log xfs nodev,nosuid,noexec 0 0
/dev/mapper/centos-var_log_audit /var/log/audit xfs nodev,nosuid,noexec 0 0
/dev/mapper/centos-swap swap swap defaults 0 0
/tmp/ /var/tmp none defaults,nodev,nosuid,noexec,bind 0 0

What do you think about noexcec please?

Thanks and Regards


Don't have an account?
Coming from Hortonworks? Activate your account here