Amanda and "/etc" folder ownership

I’ve been trying to set up Amanda so that I can automate backups. I’m using a NAS drive to achieve this which I’ve mounted under /mnt folder and that is all working OK. I then used the openHabian configuration tool to install the Amanda backup as per the instructions. All went well until I got to running

amcheck openhab-dir

This gave the output of

Amanda Tape Server Host Check

ERROR: directory ‘/mnt/SynologyBackups/OpenHabBackup/slots’ does not exist
NOTE: host info dir /var/lib/amanda/openhab-dir/curinfo/openHABianPi does not exist
NOTE: it will be created on the next run.
NOTE: index dir /var/lib/amanda/openhab-dir/index/openHABianPi does not exist
NOTE: it will be created on the next run.
Server check took 1.853 seconds

Amanda Backup Client Hosts Check

ERROR: openHABianPi: [/etc (/etc/amanda-security.conf) is not owned by root]
ERROR: openHABianPi: [/etc (/etc/amanda-security.conf) is not owned by root]
Client check: 1 host checked in 5.139 seconds. 2 problems found.

(brought to you by Amanda 3.3.9)

I fixed the

ERROR: directory ‘/mnt/SynologyBackups/OpenHabBackup/slots’ does not exist
NOTE: host info dir /var/lib/amanda/openhab-dir/curinfo/openHABianPi does not exist

by changing the permissions to allow user “backup” to get access. This resulted in the output becoming

Amanda Tape Server Host Check

slot 1: contains an empty volume
Will write label ‘openHABian-openhab-dir-001’ to new volume in slot 1.
NOTE: skipping tape-writable test
NOTE: host info dir /var/lib/amanda/openhab-dir/curinfo/openHABianPi does not exist
NOTE: it will be created on the next run.
NOTE: index dir /var/lib/amanda/openhab-dir/index/openHABianPi does not exist
NOTE: it will be created on the next run.
Server check took 1.452 seconds

Amanda Backup Client Hosts Check

ERROR: openHABianPi: [/etc (/etc/amanda-security.conf) is not owned by root]
ERROR: openHABianPi: [/etc (/etc/amanda-security.conf) is not owned by root]
Client check: 1 host checked in 5.121 seconds. 2 problems found.

(brought to you by Amanda 3.3.9)

When I look at the file /etc/amanda-security.conf I get the following

-rw-r–r-- 1 root root 1986 Jan 24 2017 amanda-security.conf

so the file is owned by root. However the permissions for the /etc folder are

drwxr-xr-x 100 openhabian openhabian 4096 Jun 12 14:00 etc

so /etc is owned by openhabian. I assume that this is where my problem lies. Can I change the ownership of /etc to root or is that going to mess up the rest of the system ?

Thanks
Tim

Typically /etc is usually owned by root. I’m not sure why it would be owned by openhabian. It should not hurt to change the ownership to root:root, but don’t do so recursively.

Thanks Rich. I’m sure I didn’t change the ownership but that’s how it appears now. I’ll change it to root and report back. I was just a little nervous about changing the ownership of such an important folder.

That seems to have worked. The Amanda output no longer gives any error messages. Just need to try doing a backup now and it’s all set up. Then of course I need to switch to my RPi3 I found in the cupboard :slight_smile: