为什么“~$ sudo openvpn ~/<file_name>.ovpn”会报错?

Why does "~$ sudo openvpn ~/<file_name>.ovpn" give error?

几周前我得到了一份 .ovpn 工作文件,起初,一切正常,运行 没问题。当我再次尝试使用它时,出现了这个错误

<user>@<name>:~$ sudo openvpn ~/<file_name>.ovpn
Options error: In [CMD-LINE]:1: Error opening configuration file:
/home/<name>/<file_name>.ovpn
Use --help for more information.

所以我尝试了 openvpn --config <file_name>.ovpn 并得到了这个

<user>@<name>:~$ openvpn --config <file_name>.ovpn
Tue Feb  2 11:11:08 2021 OpenVPN 2.4.7 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Sep  5 2019
Tue Feb  2 11:11:08 2021 library versions: OpenSSL 1.1.1f  31 Mar 2020, LZO 2.10
Tue Feb  2 11:11:08 2021 WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.
Tue Feb  2 11:11:08 2021 TCP/UDP: Preserving recently used remote address: [AF_INET]65.175.70.209:1194
Tue Feb  2 11:11:08 2021 UDP link local: (not bound)
Tue Feb  2 11:11:08 2021 UDP link remote: [AF_INET]65.175.70.209:1194
Tue Feb  2 11:11:09 2021 [server] Peer Connection Initiated with [AF_INET]65.175.70.209:1194
Tue Feb  2 11:11:10 2021 ERROR: Cannot ioctl TUNSETIFF tun: Operation not permitted (errno=1)
Tue Feb  2 11:11:10 2021 Exiting due to fatal error

我该怎么做才能解决这个问题?提前致谢。

我能够使用添加到上一个命令的 --auth-retryinteract 修复它:

<user>@<name>:~$ sudo openvpn --config <file_name>.ovpn --auth-retry interact         
Wed Feb  3 10:22:13 2021 OpenVPN 2.4.7 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Sep  5 2019
Wed Feb  3 10:22:13 2021 library versions: OpenSSL 1.1.1f  31 Mar 2020, LZO 2.10
Wed Feb  3 10:22:13 2021 WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.
Wed Feb  3 10:22:13 2021 TCP/UDP: Preserving recently used remote address: [AF_INET]65.175.70.209:1194
Wed Feb  3 10:22:13 2021 UDP link local: (not bound)
Wed Feb  3 10:22:13 2021 UDP link remote: [AF_INET]65.175.70.209:1194
Wed Feb  3 10:22:14 2021 [server] Peer Connection Initiated with [AF_INET]65.175.70.209:1194
Wed Feb  3 10:22:15 2021 TUN/TAP device tun0 opened
Wed Feb  3 10:22:15 2021 /sbin/ip link set dev tun0 up mtu 1500
Wed Feb  3 10:22:16 2021 /sbin/ip addr add dev tun0 local 172.16.100.185 peer 172.16.100.186
Wed Feb  3 10:22:16 2021 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Wed Feb  3 10:22:16 2021 Initialization Sequence Completed