File permissions make file unopenable?

Asked by Chris Crofton-Sleigh

Hi,

This is really a question for the forum but I have spent the best part of 20 minutes trying, without success, to log on to the Ubuntu forum so I am asking it here.

I am trying to set up a VPN connection in Ubuntu 14.04 and have downloaded and installed all the requisite files. I wanted to test the connection by typing:

'openvpn /etc/openvpn/idc/client.conf'

and get an error which says that the file 'client.conf' can't be opened.

Is this because I need to change the file permissions or because the file ought to be in the OpenVPN directory or because it might be corrupt?

I obtained the file 'client.conf' from 'usr/share/doc/openvpn/examples/sample-config.files' and transferred it to /etc/openvpn/idc where I edited it with the necessary parameters that the VPN provider sent me.

I would be grateful for any help

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

What is the output of:

ls -la /etc/openvpn/idc/client.conf; lsb_release -a; uname -a

Thanks

Revision history for this message
Thomas Krüger (thkrueger) said :
#2

In most cases openvpn has to be started as root. This will also solve the permission problem. Try:
sudo openvpn /etc/openvpn/idc/client.conf

Just to be sure: you don't put quotes around it.

Revision history for this message
Chris Crofton-Sleigh (chris-cs62) said :
#3

Hi actionparsnip,

Here is the output from that set of commands:

chis@chris-PC1:~$ sudo ls -la /etc/openvpn/idc/client.conf; lsb_release -a; uname -a
[sudo] password for chis:
-rw-r--r-- 1 root root 3495 Jul 1 17:46 /etc/openvpn/idc/client.conf
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04 LTS
Release: 14.04
Codename: trusty
Linux chris-PC1 3.13.0-30-generic #54-Ubuntu SMP Mon Jun 9 22:45:01 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

Revision history for this message
Chris Crofton-Sleigh (chris-cs62) said :
#4

Thanks for your suggestion, Thomas,

I tried that but am not sure what to make of the output. here it is:

chis@chris-PC1:~$ sudo openvpn /etc/openvpn/idc/client.conf
Wed Jul 2 12:44:22 2014 OpenVPN 2.3.2 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [eurephia] [MH] [IPv6] built on Feb 4 2014
Wed Jul 2 12:44:22 2014 WARNING: file '/etc/openvpn/idc/vpnclient.key' is group or others accessible
Wed Jul 2 12:44:22 2014 Socket Buffers: R=[212992->131072] S=[212992->131072]
Wed Jul 2 12:44:22 2014 NOTE: UID/GID downgrade will be delayed because of --client, --pull, or --up-delay
Wed Jul 2 12:44:22 2014 UDPv4 link local: [undef]
Wed Jul 2 12:44:22 2014 UDPv4 link remote: [AF_INET]77.92.68.63:9081
Wed Jul 2 12:45:22 2014 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
Wed Jul 2 12:45:22 2014 TLS Error: TLS handshake failed
Wed Jul 2 12:45:22 2014 SIGUSR1[soft,tls-error] received, process restarting
Wed Jul 2 12:45:22 2014 Restart pause, 2 second(s)
Wed Jul 2 12:45:24 2014 Socket Buffers: R=[212992->131072] S=[212992->131072]
Wed Jul 2 12:45:24 2014 UDPv4 link local: [undef]
Wed Jul 2 12:45:24 2014 UDPv4 link remote: [AF_INET]77.92.68.63:9081

Revision history for this message
Chris Crofton-Sleigh (chris-cs62) said :
#5

Hi again Thomas,

I didn't realise that one had to open OpenVPN as root. That is obviously why the 'client.conf' file could not be opened, so thanks for pointing that out.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#6

the config file is only readable by root. Users can read the ACLs on a file, so I don't know why you added sudo there when I didn't have it on my command.

Can you help with this problem?

Provide an answer of your own, or ask Chris Crofton-Sleigh for more information if necessary.

To post a message you must log in.