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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

David FavorLinux/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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
AWS

From novice to tech pro — start learning today.