4

My university decided that the old VPN-network, which worked fine, wasn't good enough anymore and abandoned it. Now I have to establish a completely new VPN-network. My university provided me with a manual (in dutch) which I followed, but it doesn't work. Almost everything could be the problem but where I'm really stuck is at the part where terminal says:

open(/home/simon/.juniper_networks/network_connect/ncsvc.log) failed: Permission denied
ncsvc> Failed to setuid to root. Error 1: Operation not permitted

This happens everytime I enter the command that my university told me to execute:

'/usr/local/nc/ncsvc' ./ncsvc -h uvavpn.uva.nl -u < username > -r users -f uvavpn.uva.nl.der

I searched some fora looking for anwsers but since I'm a new Ubuntu user I didn't understand what was going on at all. Is there someone out there who knows how to solve this error? And can explain it to me in the easiest possible way? I use Ubuntu 12.04, 32-bit.

I do hope that this is the right place to ask this question, Thanks in advance, Simon

Mitch
  • 106,657
  • 24
  • 210
  • 268
Simon
  • 41
  • 1
  • 3

3 Answers3

4

It's mostly a problem of your HOME-directory. It's encrypted, am I right? ;) So it is mounted with a "nosetuid" option, that prevents any SUID Operations to work as you expect them.

Solution: copy your network-connect directory somewhere else on your HDD i.e. /opt/juniperconnect, edit the junipernc-script to point to the new directory (called _jpath in the script /usr/local/bin/junipernc ), and then it works for me. I'm still using nc version 7.1 with Ubuntu 14.04 LTS.

2707974
  • 10,363
  • 6
  • 31
  • 44
Burk
  • 41
  • 2
4

If your home directory is encrypted, then this is a duplicate of Error when running binary with root setuid under encrypted home directory. If it's not (or your entire drive is encrypted, which is different), then you can fix this like this:

$ ll ~/.juniper_networks/network_connect/ncsvc
-rwx--x--x 1 mvorburger mvorburger 1274492 Feb 14 14:14 ncsvc
$ sudo chown root:root ~/.juniper_networks/network_connect/ncsvc
$ sudo chmod 6711 ~/.juniper_networks/network_connect/ncsvc
$ ll ~/.juniper_networks/network_connect/ncsvc
-rws--s--x 1 root root 1274492 Feb 14 14:14 ncsvc
vorburger
  • 684
  • 2
  • 8
  • 18
  • 1
    Pulse version 8.1R8 had this exact problem after my install. Perhaps because I used Alien to install it, but I had to manually untar pulsesvc out of a pulse.tgz, and it had bad permissions. – Randall Feb 01 '17 at 18:10
1

Are you talking about the UvA VPN? This took me a long time to solve as well. Here are some questions to see how far your installation has progressed:

Have you downloaded the certificate into the /user/local/nc folder?

Have you installed Java?

And, don't forget to change your directory to the /user/local/nc folder before executing the command as well.

For me, the command I have put into a little script runs as follows:

cd /usr/local/nc

sudo ./ncsvc -h uvavpn.uva.nl -u -r users -f uvavpn.uva.nl.der

(don't forget to replace with your username).

Let me know if this helps you along, if not, I can check what's wrong from there.

Peeperkorn
  • 161
  • 4
  • 11