Ubuntu File Permissions Question for Server Running OpenVPN Access Server

Tessando
Tessando used Ask the Experts™
on
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


...
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Fractional CTO
Distinguished Expert 2018
Commented:
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.
TessandoIT Administrator

Author

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!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial