Results 1 to 5 of 5

Thread: Need some help with a .run script...

  1. #1
    Join Date
    Oct 2019
    Beans
    3

    Question Need some help with a .run script...

    Hello -

    Running Ubuntu 18.04 on an Intel NUC server.

    The installer for PIA VPN that gets downloaded from their Downloads page is a .run file. I downloaded the file, opened Terminal and went to Downloads.

    I then ran the file and got a "permission denied" error:

    ./pia-linux-2.6.1-05824.run
    Verifying archive integrity... 100% MD5 checksums are OK. All good.
    Uncompressing Private Internet Access 100%
    ./pia-linux-2.6.1-05824.run: 1: eval: ./install.sh: Permission denied

    I made sure the file was an executable by:

    chmod u+x pia-linux-2.6.1-05824.run

    Tried it again, and the error came up.

    After hours of RTFM, I found the .run command has arguments. I tried

    ./pia-linux-2.6.1-05824.run --target mytempdir

    And this worked as it was supposed to work.

    I don't understand what is going on. I've spent hours trying to figure this out - i am sure this is a Linux thing. I would like to learn something. Why did this work with the --target option?

    Thanks!

  2. #2
    Join Date
    Jan 2006
    Location
    Sunny Southend-on-Sea
    Beans
    8,430
    Distro
    Kubuntu 20.04 Focal Fossa

    Re: Need some help with a .run script...

    Quote Originally Posted by redrock14 View Post
    I don't understand what is going on. I've spent hours trying to figure this out - i am sure this is a Linux thing.
    It's not "a Linux thing," since .run files are used to bundle a script and binary data together, which is very much a not-Linux way of doing things. The Linux thing would be distributing the source so that distro maintainers could create a native package to be installed with a package manager.

    What it is, though, is a multiuser OS thing. Your usual account has no permissions to write anywhere but your home directory and per-user temporary files. If your user account has the correct privileges, you can temporarily elevate your privileges to those of root or a different user, which allows you to write elsewhere. By giving that script an explicit target that you are able to write to, rather than wherever it was trying to use before, it was able to complete its task, whatever that was.

  3. #3
    Join Date
    Oct 2019
    Beans
    3

    Re: Need some help with a .run script...

    Thank you.

    In the middle of all my reading, I did see the .run type package is not a preferred way of doing things as you mentioned in your reply. And the multiuser settings make sense now. Essentially the "automated" way in which the script runs and creates the behind-the-scenes folder is where the problem is at. The permission was not set properly, however when the destination folder is mentioned explicitly then it works.

    Thank you.

  4. #4
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Need some help with a .run script...

    Generally, VPN installation and startup requires elevated access. More more secure OSes have this requirement.
    I've never used the PIA installer, but have been a customer for a few years. Usually, I just use the openvpn package from the repos and grab the ovpn config files from PIA and use those.

    The short answer, with a tiny bit of risk, is to use sudo with the command.
    Code:
    sudo /path/to/pia.x.x.x.run
    More details:
    Linux doesn't care about extensions. .run mean nothing special to the OS. Neither does .sh or even .pdf. On Unix-like OSes (basically every popular OS today except 1), the header of each file is checked to determine the type of file it really is. Some GUI programs will filter file lists using extensions, but the OS does not care. We can use the 'file' tool to check the type of file.
    Code:
    file /path/to/pia.x.x.x.run
    for example.
    Last edited by TheFu; January 10th, 2021 at 08:10 PM.

  5. #5
    Join Date
    Aug 2016
    Location
    Wandering
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Need some help with a .run script...

    Never had a problem 5 years with PIA
    Code:
    bash pia-linux-2.x.-05676.run
    After a CD to the installer.
    Or even:
    Code:
     sh pia-linux-2.6.1-05824.run
    That version is current as of 1/10/2021
    Last edited by 1fallen; January 10th, 2021 at 08:22 PM.
    With realization of one's own potential and self-confidence in one's ability, one can build a better world.
    Dalai Lama>>
    Code Tags | System-info | Forum Guide lines | Arch Linux, Debian Unstable, FreeBSD

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •