Support Questions

Find answers, ask questions, and share your expertise
Celebrating as our community reaches 100,000 members! Thank you!

ambari agent failed to start Permission denied


I want to manually install ambari-agent in the same host that contains ambari-server when I try ambari-agent start it gives me "bash: /var/lib/ambari-agent/bin/ambari-agent: Permission denied" I run the command with root permission, how to start ambari-agent

any help, please


Super Guru

@chaouki trabelsi,

Are you running ambari agent as a non-root user or root user. If you are running as a non-root user, you need to follow these steps.




Thanks @Aditya Sirna for the quick response, I m running as a root user, I already installed and start ambari server and it didn't gives errors

New Contributor

Hi @chaouki trabelsi

Were you able to resolve the issue ? Im also facing same problem and trying to figure it out.


Super Guru

You will need to add the ssh-key for the ambari server to ~/ or /root/.ssh/authorized_keys. This will allow the server to ssh to itself and install the agent. Be sure to test before trying: ssh root@localhost and accept the prompts the first time.

If this answer helps, please ACCEPT.


@chaouki trabelsi simply run "ambari-agent start" command. if you are attempting that command with non-root user then switch to root user and try again.


Hi @chaouki trabelsi ,

Are you able to resolve the issue.

I hope if you run the Command ambari-agent start as root user you should be able to start the ambari-agent.

If you are still facing the issue . Please attach the error logs while running the command to this thread.

hope this helps.

New Contributor

Hi All,

After fresh installation of ambari-agent its giving below permission denied error on /var/lib/ambari-agent/bin/ambari-agent file.

I have tried changing file owneship and read write access permissions. Appreciate any help



Hi @Wasantha Herath ,

have you installed ambari-agent via root only ?

whats permission of this folder and this file now.

this looks permission issue only.


Check your /var mount in /etc/fstab, if it has noexec then /var has enough permissions.

Try to remount giving the permission :

#mount -o remount,defaults,nosuid,nodev,exec /var/