This support forum board is for support questions relating to
Nagios Log Server , our solution for managing and monitoring critical log data.
mrochelle
Posts: 238 Joined: Fri May 04, 2012 11:20 am
Location: Heart of America
Post
by mrochelle » Wed Jun 16, 2021 4:25 pm
I continue to get the following error when attempting to create a repository.
The snapshot repository in directory /usr/local/nagioslogserver/archives/snapshots_repository could not be created. Possibly due to permissions. Make sure the nagios user can write to the location.
Permissions are good.
drwxrwxrwx. 2 nagios nagios 6 Jun 16 10:12 snapshots_repository.
School me please.
You do not have the required permissions to view the files attached to this post.
vtrac
Posts: 903 Joined: Tue Oct 27, 2020 1:35 pm
Post
by vtrac » Thu Jun 17, 2021 2:31 pm
Hi,
How are you doing?
Please try the followings:
Code: Select all
chown -R nagios:nagios /usr/local/nagioslogserver/archives/snapshots_repository/
chown -R 775 /usr/local/nagioslogserver/archives/snapshots_repository/
Now, please try the creation of repository again.
Best Regards,
Vinh
mrochelle
Posts: 238 Joined: Fri May 04, 2012 11:20 am
Location: Heart of America
Post
by mrochelle » Thu Jun 17, 2021 3:09 pm
Doing good Vinh. I tried your commands but no change. Same error as before: The snapshot repository in directory /usr/local/nagioslogserver/archives/snapshots_repository could not be created. Possibly due to permissions. Make sure the nagios user can write to the location.
Marcus
vtrac
Posts: 903 Joined: Tue Oct 27, 2020 1:35 pm
Post
by vtrac » Thu Jun 17, 2021 3:27 pm
Hi Marcus,
Do you have SELinux turned on?
Please run this:
Can you manually create a file under "snapshots_repository"?
Code: Select all
su - nagios
touch /usr/local/nagioslogserver/archives/snapshots_repository/test.out
ls -laZ /usr/local/nagioslogserver/archives/snapshots_repository/
Best Regards,
Vinh
mrochelle
Posts: 238 Joined: Fri May 04, 2012 11:20 am
Location: Heart of America
Post
by mrochelle » Fri Jun 18, 2021 12:20 pm
SELinux status: disabled
brb.
nagioslogserver]$ ls -laZ /usr/local/nagioslogserver/archives/snapshots_repository/
total 0
drwxrwxr-x 2 nagios nagios ? 22 Jun 18 12:44 .
drwxrwxr-x. 3 nagios nagios unconfined_u:object_r:usr_t:s0 34 Jun 18 12:37 ..
-rw-r--r-- 1 nagios users ? 0 Jun 18 12:44 test.out
vtrac
Posts: 903 Joined: Tue Oct 27, 2020 1:35 pm
Post
by vtrac » Fri Jun 18, 2021 1:47 pm
Hi Marcus,
Hope you are having a good day.
Please run the below commands on your LogServer as "root":
Code: Select all
usermod -G nagios,apache,users nagios
chcon unconfined_u:object_r:usr_t:s0 /usr/local/nagioslogserver/archives/snapshots_repository
ls -laZ /usr/local/nagioslogserver/archives/snapshots_repository
systemctl restart httpd
Now, please try adding the repository again.
Best Regards,
Vinh
mrochelle
Posts: 238 Joined: Fri May 04, 2012 11:20 am
Location: Heart of America
Post
by mrochelle » Fri Jun 18, 2021 2:59 pm
Ran the requested commands and problem still exits.
vtrac
Posts: 903 Joined: Tue Oct 27, 2020 1:35 pm
Post
by vtrac » Fri Jun 18, 2021 3:43 pm
Hi,
What OS does your Nagios LogServer runs on?
What version of LogServer?
Also, please post screenshot or outputs of the followings:
Code: Select all
grep apache /etc/group
grep apache /etc/group
ls -laZ /usr/local/nagioslogserver/archives/snapshots_repository
rpm -qa | grep openssh
If you could, please restart your OS (system).
Code: Select all
systemctl stop logstash
systemctl stop elasticsearch
reboot
Best Regards,
Vinh
vtrac
Posts: 903 Joined: Tue Oct 27, 2020 1:35 pm
Post
by vtrac » Fri Jun 18, 2021 4:05 pm
Hi,
It would be very helpful if you could upload screenshot of the error(s) on the webpage?
Please also upload outputs of these folders after you have reboot your server:
ls -la /usr/local/nagioslogserver
ls -la /usr/local/nagioslogserver/archives
Regards,
Vinh
vtrac
Posts: 903 Joined: Tue Oct 27, 2020 1:35 pm
Post
by vtrac » Fri Jun 18, 2021 4:20 pm
Hi,
I have asked my team member (Sean) for help, trying to look at the code that do the creation.
Please try this:
Code: Select all
cd /usr/local/nagioslogserver/archives/
rm -rf snapshots_repository
Now, please try adding the "snapshots_repository" again.
Best Regards,
Vinh