【问题标题】:Systemd throws incomprehensible permission deniedSystemd 抛出无法理解的权限被拒绝
【发布时间】:2021-06-21 11:14:50
【问题描述】:

这应该很容易,但我完全迷路了。我的 /etc/systemd/system 目录中有一个脚本来启动 IBM HTTP Server: ihs.服务

[Unit]
Description=IBM HTTP Server
After=network.target remote-fs.target nss-lookup.target

[Service]
Type=forking
PIDFile=/appl/ihs/logs/httpd.pid
ExecStart=/appl/ihs/bin/apachectl start
ExecStop=/appl/ihs/bin/apachectl graceful-stop
ExecReload=/appl/ihs/bin/apachectl graceful
PrivateTmp=true
LimitNOFILE=infinity

[Install]
WantedBy=multi-user.target

-rw-r--r--。 1根根355 Jun 21 13:06 ihs.service

-rwxr-xr-x。 1 wasusr wasgrp 3414 5 月 12 日 14:02 /appl/ihs/bin/apachectl

systemctl start ihs.service 在日志中给出了一个错误:

Jun 21 12:34:21 (myhostname) systemd[2814762]: ihs.service: 执行: /appl/ihs/bin/apachectl start 6 月 21 日 12:34:21 (myhostname) systemd[2814762]: ihs.service: 无法执行命令:权限被拒绝 6 月 21 日 12:34:21 (myhostname) systemd[2814762]: ihs.service: 执行步骤执行失败 /appl/ihs/bin/apachectl: 权限被拒绝 -- 主题:无法执行进程 /appl/ihs/bin/apachectl -- 定义者:systemd -- 支持:https://access.redhat.com/support

--进程/appl/ihs/bin/apachectl无法执行失败。

-- 该进程返回的错误号为13。

systemd 怎么可能在拥有所需权限时报告该进程无法执行? 从命令行运行相同的命令可以完美运行。 pid文件目录也存在

【问题讨论】:

    标签: systemd centos8


    【解决方案1】:

    最后这是一个简单的问题:SELinux。 通常我在需要安装 COTS 软件的机器上将其切换为许可或将其关闭,但我忘记了这个。 因此,在 /etc/selinux/conf 中将 SELINUX= 设置为 permissive 或 disabled

    【讨论】:

      猜你喜欢
      • 2011-04-09
      • 1970-01-01
      • 1970-01-01
      • 2019-11-20
      • 1970-01-01
      • 2020-05-31
      • 2021-11-25
      • 2019-04-20
      • 2012-01-27
      相关资源
      最近更新 更多