-bash: /var/log/mongodb-mms-automation/automation-agent.log: Permission denied

1,012 views
Skip to first unread message

Thiago Salhab Alves

unread,
Oct 26, 2014, 10:08:13 AM10/26/14
to mongod...@googlegroups.com
Hi, Im new at mongodb.
Im Mac OS 10.9.5 user.
I install mongodb (its ok).
Now im installing the MMS for mongodb.
But I have some problems with this lines permissions
Create the directories /var/lib/mongodb-mms-automation, /var/log/mongodb-mms-automation and /data and ensure that they are owned by same user that you will use to run the agent.
I try: mkdir -p /var/lib/mongodb-mms-automation
       mkdir -p /var/log/mongodb-mms-automation
       mkdir -p /data

First I have some problems but after digited sudo touch /var/lib/mongodb-mms-automation.lock, its work.
       
But when I was started  the agent:

nohup ./mongodb-mms-automation-agent --config=local.config >> /var/log/mongodb-mms-automation/automation-agent.log 2>&1 &

The last line when executed returned: -bash: /var/log/mongodb-mms-automation/automation-agent.log: Permission denied

Could you help to make it work?

Thanks

Thiago Salhab Alves

Gabriela Arrais

unread,
Nov 21, 2014, 12:38:46 PM11/21/14
to mongod...@googlegroups.com
Hi!

I have the same problem here...could you find a solution? 

Doug

unread,
Nov 21, 2014, 2:23:39 PM11/21/14
to mongod...@googlegroups.com
Hi Thiago,

I would check the permissions on the file. When you run `ls -alh /var/lib/mongodb-mms-automation/automation-agent.log` check to see if the file is owned by `root`. If it is you will need to change the owner to the user that will be running the agent, or allow less restrictive permissions on the file itself.

Doug
Message has been deleted

Stephen Steneker

unread,
Jul 16, 2015, 5:41:06 AM7/16/15
to mongod...@googlegroups.com, pulkit...@gmail.com
Hi Pulkit,

You're replying to a discussion from last year that likely describes a very different environment (OS X 10.9.5) and certainly an older version of the automation agent. If there are issues with file/directory permissions the exact commands to fix will depend on your O/S and how you installed MongoDB.

Can you please start a new discussion with details of your environment and issue (i.e. O/S version, automation agent version, any specific error or log messages, ...)? It would also be helpful if you can include your group name or a link to the group in MongoDB Cloud Manager so one of the MongoDB team members could review.

Thanks,
Stephen

On Wednesday, 15 July 2015 05:13:06 UTC+10, Pulkit Singhal wrote:
Few things have changed, some of it maybe the default documentation and the other parts may have to do with the location of log file being different these days.

Instead of:
$ sudo chown `whoami` /var/lib/mongodb-mms-automation
$ sudo chown
`whoami` /var/log/mongodb-mms-automation

$ nohup ./mongodb-mms-automation-agent --config=local.config >> /var/log/mongodb-mms-automation/automation-agent.log 2>&1 &

The following worked better for me:

sudo chown mongodb /var/lib/mongodb-mms-automation
sudo chown mongodb
/var/log/mongodb-mms-automation
touch
/tmp/mongodb-mms-automation.lock
sudo chown mongodb
/tmp/mongodb-mms-automation.lock
sudo
-s
su mongodb
-s /bin/sh
newgrp mongodb
id
nohup
./mongodb-mms-automation-agent --config=local.config >> /var/log/mongodb-mms-automation/automation-agent.log 2>&1 &

But afterwards I still didn't get very far.

Shlok Malik

unread,
Apr 4, 2016, 7:05:11 AM4/4/16
to mongodb-user
Facing same issue

Hosted on aws ec2 

Ubuntu 14.04.2 LTS (GNU/Linux 3.13.0-48-generic x86_64)


Error in mongo cloud manager: Error rotating log /var/log/mongodb-mms-automation/monitoring-agent.log : <Monitoring Agent Manager> [09:31:56.067] Error opening /var/log/mongodb-mms-automation/monitoring-agent.log : open /var/log/mongodb-mms-automation/monitoring-agent.log: permission denied


Versions: 

State
 
Port
 
Version
 
 Automation Agent
 
2.6.4.1612
 
 Monitoring Agent
 
4.1.0.251
 
 Backup Agent    
 
4.1.0.347

How do I proceed?
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages