No such file or directory

74 views
Skip to first unread message

Sven Sorrell

unread,
Oct 4, 2013, 4:30:16 AM10/4/13
to android-open...@googlegroups.com
I have my .ovpn file, ca.crt, client.crt and client.key in the /sdcard/openvpn directory.
When I changed the client.ovpn file to client.conf and did "Refresh", OpenVPN Settings registered the change and updated to show the new file name.

However, when I try to select the conf file, it flashes "Startup..." for a tiny moment, then does nothing (box is unchecked). I checked the log file, and the error message is
"cd to /sdcard/openvpn" failed: No such file or directory (errno=2).

But I know that it is finding the directory, and exactly the same setup works on my other device. What is the problem?

I'm on Android 4.3 (Cyanogenmod) on Nexus 7-2013. All "prerequisites" are green. I'm trying to connect to a TAP VPN, for what it's worth.

Thanks.

Sven Sorrell

unread,
Oct 6, 2013, 3:08:40 AM10/6/13
to android-open...@googlegroups.com
I managed to solve this myself; I am posting the solution in case anyone else finds the same problem.

It seems that (in 4.3 at least) the shell doesn't have permission to read the /sdcard directory. I tried it through adb, including as "root", but both times I got the same error as above. "cd /sdcard" followed by "ls" gave me a blank directory listing.

Solution: Point OpenVPN Settings to /storage/emulated/0/openvpn : this is the same directory (there are various ways it is symlinked), but in this way, OpenVPN Settings can access the directory.
Now, when OVPNS tries to run the shell, it finds the .conf file, and everything works!

You might see multiple versions of your .conf / .ovpn file showing up, use the one that is just the filename, not with any directory names in front of it.
Reply all
Reply to author
Forward
0 new messages