asjohem
Posts: 3
Joined: Thu Oct 24, 2019 8:09 pm

Move/copy file from /root/

Fri Oct 25, 2019 6:34 am

Hi!

I have setup a pi Modell 3B with Pi-hole and Openvpn, what I can see everything is running ok.
I created cert for ovpn client, and the .ovpn file creates in /root/ but how do I move it to another folder with permissions so I then can move it via ex SFTP to a client?

For example from: /root/file.ovpn to /usr/local/share/file.ovpn

I have no permissions to /root/, googled alot and tried both SFTP with filezilla and SSh with PuTTy.

Followed this guide: https://docs.pi-hole.net/guides/vpn/set ... pn-server/
Pi 3B Pi-Hole PiVPN
MovieNAS 3+2Tb
HTPC LibreElec CPU Athlon 5150 R3 1.6GHz RAM 16Gb@1600MHz
FreeNAS 11.2 5x2Tb RaidZ CPU Intel i5 660 3.33GHz RAM 16Gb@1333MHz
Gaming W10 CPU Ryzen 5 2600 3.4GHz GPU GTX 1070 RAM 16Gb@2133MHz

User avatar
thagrol
Posts: 3178
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: Move/copy file from /root/

Fri Oct 25, 2019 9:46 am

Try

Code: Select all

cp /root/file.ovpn /usr/local/share/file.ovpn
If that fails, try

Code: Select all

sudo chmod a+r /root/file.ovpn
cp /root/file.ovpn /usr/local/share/file.ovpn
Arguing with strangers on the internet since 1993.

asjohem
Posts: 3
Joined: Thu Oct 24, 2019 8:09 pm

Re: Move/copy file from /root/

Fri Oct 25, 2019 2:49 pm

thagrol wrote:
Fri Oct 25, 2019 9:46 am
Try

Code: Select all

cp /root/file.ovpn /usr/local/share/file.ovpn
If that fails, try

Code: Select all

sudo chmod a+r /root/file.ovpn
cp /root/file.ovpn /usr/local/share/file.ovpn
Tried with sudo -i and it did the job! Thanks for the help anyway :)
But my openvpn app didnt accept the file, so I got rid of the openvpn on my Pi and installed PiVPN. Now everything works perfectly!
Pi 3B Pi-Hole PiVPN
MovieNAS 3+2Tb
HTPC LibreElec CPU Athlon 5150 R3 1.6GHz RAM 16Gb@1600MHz
FreeNAS 11.2 5x2Tb RaidZ CPU Intel i5 660 3.33GHz RAM 16Gb@1333MHz
Gaming W10 CPU Ryzen 5 2600 3.4GHz GPU GTX 1070 RAM 16Gb@2133MHz

Return to “Beginners”