Page 1 of 1

Nagios XI unable to create scheduled local auto backup.

Posted: Mon Mar 22, 2021 2:34 pm
by rupesh_arora_tmna
Nagios XI unable to create auto backup "The directory is likely not writeable by user 'nagios' or group 'nagios' - check permissions."

Code: Select all

ls -ld /store/backups/
drwxrwxr-x. 4 nagios nagios 33 Feb 12  2016 /store/backups/

Code: Select all

 ls -l /store/backups/
total 0
drwxr-xr-x. 5 root   root   45 Mar 22 07:02 mysql
drwxrwxr-x. 2 nagios nagios  6 Feb 12  2016 nagiosxi
While mysql backup is running.

Code: Select all

 du -sh *
11G     mysql
0       nagiosxi

If, I change the directory to /tmp/ then it says The directory exists and is writeable.
.

Re: Nagios XI unable to create scheduled local auto backup.

Posted: Tue Mar 23, 2021 10:36 am
by dchurch
What's the output from the following commands?

Code: Select all

ls -ld /store

Re: Nagios XI unable to create scheduled local auto backup.

Posted: Tue Apr 06, 2021 8:54 am
by rupesh_arora_tmna
Here is the output.

Code: Select all

ls -ld /store
drwxr-xr-x. 3 root root 20 Feb 12  2016 /store
FYI in my newer version of Nagios it's able to do, with same permission.
Also tried change 0777 with owner nagios recursively over whole directory still not working.
But working with /tmp directory.

Any suggestions?

Re: Nagios XI unable to create scheduled local auto backup.

Posted: Tue Apr 06, 2021 4:23 pm
by dchurch
So I did some digging and apparently the code that indicates whether a directory is suitable to accept the automated backup -- has bugs. As such, whether the directory will actually work for backups has little or nothing to do with what the user interface will show you when selecting a backup directory.

Really, a more suitable check would be to just plug in the directory into the command line:

Code: Select all

sudo -u nagios [ -w "/path/to/directory" ]
Where you plug in the directory name in place of /path/to/directory.

Long story short, if you run that command to check your backup directory, you can safely ignore what the web interface says.