Ubuntu File Permissions Question for Server Running OpenVPN Access Server

I'm running Ubuntu 14.04.5 on a 64-bit EC2 instance.

I performed in In-Place upgrade for my OpenVPN Access Server yesterday and one of the things the instructions suggest is backing up four particular configuration files.

This is described in this link.

When I navigate to the config file location that I want to backup and run this command:

./bin/sqlite3 ./etc/db/config.db .dump > ./config.db.bak

Open in new window


I get the following result:

mp > ./config.db.bak
-bash: ./config.db.bak: Permission denied

Open in new window


When I add "sudo" in front of the command I get the same result.

Now, the instructions from OpenVPN claim that this can be done while the server is active. In other words, these can be copied while those services are running.

However, I'm a little stumped as to why I can't copy these.

As an administrator, how can I get the proper permissions to backup these configuration files?

Thanks for your help


...
TessandoIT AdministratorAsked:
Who is Participating?
 
David FavorConnect With a Mentor Linux/LXD/WordPress/Hosting SavantCommented:
Sounds like the file may be chattr'ed or you're running SELinux.

Something's amiss.

Simple test is to do a sudo bash + cd to the directory where you're trying to do your backups + try touch foo + see what occurs.

You can also try prepending ~ in front of your output files, which should route them to your /home directory, which you should be able to write to by default.
0
 
TessandoIT AdministratorAuthor Commented:
Thanks for your help.

What ended up resolving my problem was using the "sudo su" command. This gave me the proper permissions to be able to backup those config files.

Thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.