Backup Additional Directories Permission

I am trying to backup additional directories in my full backup, in this case my /etc/OpenVPN directory but it fails due to permission.

May 10, 2016, 8:22 pm - data: rsync: send_files failed to open “/etc/openvpn/ipp.txt”: Permission denied (13)

Is this a simple command to give the backup permission and will it mess up anything else?
Thanks, Addison

This is second semester Unix stuff.

If you know the user that is performing the backup, simply set the group permissions on your /etc/openvpn directory to read.

chmod -R g:r /etc/openvpn

Next, set the group for all of the files under OpenVPN so that the group is the same.

chgrp -R [group] /etc/openvpn

Next, edit the /etc/groups file so that the user you are backing up with is in the group for backups.

vi /etc/groups

Now, if the group that can access the /etc/openvpn directory tree is already set to the asterisk group (could be asterisk, could be www, could be something else), all you’ll need to do is the chmod. This should give your backup user read access to the files.

So, there are three things to look for. Any one of them can prevent the backup user from being able to access the files.

Thanks, unfortunately I’m still a first semester UNIX learner.

How can I be sure what the user is that is performing the backup? I assume it is Asterisk as I have seen that lots of other places in the forum. This is a distro iso install so everything is stock.

When using chmod -R group:root /etc/openvpn should I be using a predefined group or creating a new one?
The only reason I am asking these questions here instead of a generic Linux forum is I want to make sure I don’t jeopardize something on the FreePBX side.