AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-1073380

Chronocide's questions

Martin Hope
Chronocide
Asked: 2024-04-17 05:32:25 +0800 CST

解决更新包时出现“GPG 密钥检查错误”的问题

  • 5

我正在尝试使用将现有服务器上的节点从 v20.10.0 更新到 v20.12.2 sudo dnf update。但出现以下错误:

Node.js Packages for Linux RPM based distros - x86_64                                                                                                                            1.6 MB/s | 1.7 kB     00:00
GPG key at file:///etc/pki/rpm-gpg/NODESOURCE-NSOLID-GPG-SIGNING-KEY-EL (0x9B1BE0B4) is already installed
The GPG keys listed for the "Node.js Packages for Linux RPM based distros - x86_64" repository are already installed but they are not correct for this package.
Check that the correct key URLs are configured for this repository.. Failing package is: nodejs-2:20.12.2-1nodesource.x86_64
 GPG Keys are configured as: file:///etc/pki/rpm-gpg/NODESOURCE-NSOLID-GPG-SIGNING-KEY-EL
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Error: GPG check FAILED

有没有办法更新 GPG 密钥?如果是的话怎么办?

node.js
  • 1 个回答
  • 28 Views
Martin Hope
Chronocide
Asked: 2024-02-01 06:01:17 +0800 CST

如何配置 SE Linux 以便 PHP 可以通过套接字连接到 Postgres

  • 5

我有一个连接到 Postgresql 数据库的 PHP 应用程序。当我通过网络连接时,这是有效的,但在尝试使用套接字连接时,我遇到了 SELinux 违规。我相信上下文设置正确并且启用了正确的标志。

httpd_can_network_connect --> on
httpd_can_network_connect_db --> on

失败的 sealert 消息如下所示:

SELinux is preventing /usr/sbin/php-fpm from connectto access on the unix_stream_socket /run/postgresql/.s.PGSQL.5432.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that php-fpm should be allowed connectto access on the .s.PGSQL.5432 unix_stream_socket by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# ausearch -c 'php-fpm' --raw | audit2allow -M my-phpfpm
# semodule -X 300 -i my-phpfpm.pp


Additional Information:
Source Context                system_u:system_r:httpd_t:s0
Target Context                system_u:system_r:unconfined_service_t:s0
Target Objects                /run/postgresql/.s.PGSQL.5432 [ unix_stream_socket
                              ]
Source                        php-fpm
Source Path                   /usr/sbin/php-fpm
Port                          <Unknown>
Host                          localhost.localdomain
Source RPM Packages           php-fpm-8.2.13-1.el9.remi.x86_64
Target RPM Packages
SELinux Policy RPM            selinux-policy-targeted-38.1.23-1.el9.noarch
Local Policy RPM              selinux-policy-targeted-38.1.23-1.el9.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     localhost.localdomain
Platform                      Linux localhost.localdomain
                              5.14.0-362.8.1.el9_3.x86_64 #1 SMP PREEMPT_DYNAMIC
                              Wed Nov 8 17:36:32 UTC 2023 x86_64 x86_64
Alert Count                   1080
First Seen                    2023-12-29 14:34:45 PST
Last Seen                     2024-01-31 12:15:18 PST
Local ID                      e3bcfa07-6867-47e3-bedf-4d8ca2d16443

Raw Audit Messages
type=AVC msg=audit(1706732118.737:4455): avc:  denied  { connectto } for  pid=516281 comm="php-fpm" path="/run/postgresql/.s.PGSQL.5432" scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:system_r:unconfined_service_t:s0 tclass=unix_stream_socket permissive=0


type=SYSCALL msg=audit(1706732118.737:4455): arch=x86_64 syscall=connect success=no exit=EACCES a0=8 a1=561638666d58 a2=6e a3=7fa9f9d951a0 items=0 ppid=516267 pid=516281 auid=4294967295 uid=984 gid=984 euid=984 suid=984 fsuid=984 egid=984 sgid=984 fsgid=984 tty=(none) ses=4294967295 comm=php-fpm exe=/usr/sbin/php-fpm subj=system_u:system_r:httpd_t:s0 key=(null)

Hash: php-fpm,httpd_t,unconfined_service_t,unix_stream_socket,connectto

一件看起来很奇怪的事情是缺少 postgres 套接字的 RPM 包。

提供了生成本地策略模块的说明;但我不明白这些命令到底会做什么,并且犹豫是否要运行它们。

ausearch -c 'php-fpm' --raw | audit2allow -M my-phpfpm
semodule -X 300 -i my-phpfpm.pp
php
  • 2 个回答
  • 73 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve