Weird behaviour from Bareos [SOLVED]

Hi guys,
Bareos 20.0.2 on FBSD 13.0-Release.

It's been running fine for a couple of months, and today I added a client and when doing
Code:
service bareos-dir restart

It comes back with:
Code:
Performing sanity check on /usr/local/etc/bareos/ configuration:
Starting bareos_dir.
bareos-dir: ERROR TERMINATION at lib/parse_conf.cc:242
Config error: Cannot open config file "/usr/local/etc/bareos/bareos-dir.d/*/*.conf": Permission denied

Which I find odd since I made sure that owner and perms on the new files are correct.

What's even more strange is that even though bareos own the files, and uid and gid matches, it still won't start.
bareos-sd and bareos-fd runs fine.

File perms when not working:
Code:
-rw-r-----  0 bareos bareos    558 Dec 15 12:35 usr/local/etc/bareos/bareos-dir.d/jobdefs/PmWikiServerJob.conf
-rw-r-----  0 bareos bareos    565 Dec 15 12:35 usr/local/etc/bareos/bareos-dir.d/jobdefs/BackupServerJob.conf
-rw-r-----  0 bareos bareos    566 Dec 15 12:35 usr/local/etc/bareos/bareos-dir.d/jobdefs/NextcloudServerJob.conf
-rw-r-----  0 bareos bareos    628 Dec 15 12:35 usr/local/etc/bareos/bareos-dir.d/jobdefs/DefaultJob.conf
-rw-r-----  0 bareos bareos    566 Jan  5 16:42 usr/local/etc/bareos/bareos-dir.d/jobdefs/WordpressServerJob.conf

But if I do a chmod -R 644 /usr/local/etc/bareos/bareos-dir.d it works.

What am I missing? Shouldn't bareos-dir run as bareos or?

Any advice is appreciated, thanks.

/tony
 
Which I find odd since I made sure that owner and perms on the new files are correct.
How about the permissions on the directories above it? It might not have read and execute access there.

But if I do a chmod -R 644 /usr/local/etc/bareos/bareos-dir.d it works.
Directories will need the execute bit or else you won't be able to search them. Typically directory permissions are 755, not 644. The files within that directory have 644, the directories are 755.

Code:
           0100    For files, allow execution by owner.  For directories,
                   allow the owner to search in the directory.
...
           0010    For files, allow execution by group members.  For
                   directories, allow group members to search in the
                   directory.
...
           0001    For files, allow execution by others.  For directories
                   allow others to search in the directory.
chmod(1)

Code:
dice@molly:/tmp % ls -ld /tmp/test/
drwxr-xr-x  2 dice  dice  0 Jan 24 15:27 /tmp/test/
dice@molly:/tmp % touch /tmp/test/somefile
dice@molly:/tmp % ls -al /tmp/test/
total 0
drwxr-xr-x  2 dice  dice    64 Jan 24 15:27 .
drwxrwxrwt  9 root  wheel  448 Jan 24 15:27 ..
-rw-r--r--  1 dice  dice     0 Jan 24 15:27 somefile
dice@molly:/tmp % chmod 644 /tmp/test/
dice@molly:/tmp % ls -al /tmp/test/
ls: .: Permission denied
ls: ..: Permission denied
ls: somefile: Permission denied
total 0
 
Hi SirDice,

Sorry for not getting back to you earlier, I didn't have access to the system from where I was.

You were right, the rx perms were missing on the directories. I don't know how I managed to miss that :)

Thanks for your help, everything is working now.

And thanks for being so helpful, you really make a difference for us all.

/tony
 
Back
Top