Hojjat (18)

Docker with a volume with user-level permissions

If you mount a folder in your docker all the files created in it will be owned by the root. To fix this add the following to the Dockerfile ARG USER_ID ARG GROUP_ID RUN addgroup --gid $GROUP_ID user RUN adduser --disabled-password --gecos '' --uid $USER_ID…

Continue reading...

How to switch between different versions of g++

I needed to compile an old code and needed to use older versions of g++. Here is how I did it: sudo apt install g++-4.8 g++-5 g++-6 g++-7 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 1 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 1 sudo update-alternatives --install…

Continue reading...

Cisco AnyConnect VPN in Linux (Ubuntu 18.04,19.10)

I’m writing this here for my future use. Install these: Ubuntu 18.04: sudo apt-get install openconnect lib32ncurses5 lib32tinfo5 lib32z1 libc6-i386 libpkcs11-helper1 openvpn vpnc-scripts net-tools Ubuntu 19.10: sudo apt-get install openconnect lib32ncurses6 lib32tinfo6 lib32z1 libc6-i386 libpkcs11-helper1 openvpn vpnc-scripts net-tools Download and unzip this. Go to the…

Continue reading...