Skip to content

tee: /etc/apt/trusted.gpg.d/pkgr-inventree.gpg: Permission denied #6175

Closed

Description

@Sudura

Deployment Method

  • Installer
  • Docker Development
  • Docker Production
  • Bare metal Development
  • Bare metal Production
  • Digital Ocean image
  • Other (please provide a link Steps to Reproduce

Describe the problem*

Getting and adding key

tee: /etc/apt/trusted.gpg.d/pkgr-inventree.gpg: Permission denied

Steps to Reproduce

$ wget -qO install.sh https://get.inventree.org && bash install.sh

Installer for InvenTree - source: inventree/stable

Detected distribution: Debian GNU/Linux 11

Installing required packages for download

Selecting previously unselected package apt-transport-https.
(Reading database ... 37776 files and directories currently installed.)
Preparing to unpack .../apt-transport-https_2.2.4_all.deb ...
Unpacking apt-transport-https (2.2.4) ...
Setting up apt-transport-https (2.2.4) ...

Getting and adding key

tee: /etc/apt/trusted.gpg.d/pkgr-inventree.gpg: Permission denied

Relevant log output

### Installer for InvenTree - source: inventree/stable
### Detected distribution: Debian GNU/Linux 11
### Installing required packages for download
Selecting previously unselected package apt-transport-https.
(Reading database ... 37776 files and directories currently installed.)
Preparing to unpack .../apt-transport-https_2.2.4_all.deb ...
Unpacking apt-transport-https (2.2.4) ...
Setting up apt-transport-https (2.2.4) ...
### Getting and adding key
tee: /etc/apt/trusted.gpg.d/pkgr-inventree.gpg: Permission denied

Activity

  1. added
    question
    setup
    triage:not-checked
    on Jan 8, 2024
  2. SparkeyinVA commented on Jan 8, 2024

    @SparkeyinVA

    @Sudura, I had the same issue. When installed as root it installed with no errors, however I can not get it to run as it only displays a 502 error. The 502 error may be related to : #6156, I will post my findings there.

  3. tomse commented on Jan 8, 2024

    @tomse

    yeah, does look like a permission problem.. either make the file readable for other or elevate yourself as root and then run the installer. you may need to fix some permissions afterwards.

    sudo chmod o+r /etc/apt/trusted.gpg.d/pkgr-inventree.gpg

    "run script"

    or

    sudo -i

    "run script"

  4. matmair commented on Jan 8, 2024

    @matmair
    Member

    Your user is not allowed to modify the apt keys, you will need to run the command with sudo wget -qO install.sh https://get.inventree.org/ && sudo bash install.sh

  5. removed
    triage:not-checked
    on Jan 8, 2024
  6. Sudura commented on Jan 10, 2024

    @Sudura
    Author

    With wget -qO install.sh https://get.inventree.org/ && sudo bash install.sh the installation works, now its the above mentioned 502 Bad Gateway error

  7. matmair commented on Jan 10, 2024

    @matmair
    Member

    So we can close this?

  8. SparkeyinVA commented on Jan 10, 2024

    @SparkeyinVA

    @matmair I can confirm the information that @Sudura said. As such we can close and maybe update the one line installer to include the sudo. Thanks for the help.

  9. Basilisvirus commented on May 25, 2024

    @Basilisvirus

    Had the same issue when trying:

    basilisvirus@Zen:~/invtree$ sudo wget -qO install.sh https://get.inventree.org && bash install.sh
    ### Installer for InvenTree - source: inventree/stable
    ### Detected distribution: Ubuntu 22.04
    ### Installing required packages for download
    Selecting previously unselected package apt-transport-https.
    (Reading database ... 24215 files and directories currently installed.)
    Preparing to unpack .../apt-transport-https_2.4.12_all.deb ...
    Unpacking apt-transport-https (2.4.12) ...
    Setting up apt-transport-https (2.4.12) ...
    ### Installing libssl1.1
    deb http://security.ubuntu.com/ubuntu focal-security main
    Hit:1 http://archive.ubuntu.com/ubuntu jammy InRelease
    Get:2 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
    Hit:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
    Hit:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
    Get:5 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
    Get:6 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [2954 kB]
    Get:7 http://security.ubuntu.com/ubuntu focal-security/main Translation-en [444 kB]
    Get:8 http://security.ubuntu.com/ubuntu focal-security/main amd64 c-n-f Metadata [13.2 kB]
    Fetched 3636 kB in 2s (1504 kB/s)
    Reading package lists... Done
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    The following NEW packages will be installed:
      libssl1.1
    0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
    Need to get 1323 kB of archives.
    After this operation, 4131 kB of additional disk space will be used.
    Get:1 http://security.ubuntu.com/ubuntu focal-security/main amd64 libssl1.1 amd64 1.1.1f-1ubuntu2.22 [1323 kB]
    Fetched 1323 kB in 1s (1092 kB/s)
    Preconfiguring packages ...
    Selecting previously unselected package libssl1.1:amd64.
    (Reading database ... 24219 files and directories currently installed.)
    Preparing to unpack .../libssl1.1_1.1.1f-1ubuntu2.22_amd64.deb ...
    Unpacking libssl1.1:amd64 (1.1.1f-1ubuntu2.22) ...
    Setting up libssl1.1:amd64 (1.1.1f-1ubuntu2.22) ...
    Processing triggers for libc-bin (2.35-0ubuntu3.7) ...
    /sbin/ldconfig.real: /usr/lib/wsl/lib/libcuda.so.1 is not a symbolic link
    
    ### Getting and adding key
    tee: /etc/apt/trusted.gpg.d/pkgr-inventree.gpg: Permission denied
    

    But then I used: basilisvirus@Zen:~/invtree$ sudo wget -qO install.sh https://get.inventree.org && sudo bash install.sh

    and installed correctly.

  10. SchrodingersGat commented on May 26, 2024

    @SchrodingersGat
    Member

    @Basilisvirus thanks for that additional information, I will add a note to the documentation: #7339

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionsetup

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions