我正在使用的Fedora Workstation 27 Live操作系统希望在EnableBIOS.service操作系统启动的同时运行自定义服务。为此,我必须禁用SELinux在我的环境中导致问题的功能。所以,我无法禁用SELinux.
作为替代方案,我尝试SELinux policy为我的自定义服务创建一个,但没有取得任何突破。
该服务正在记录以下消息/var/log/audit/audit.log:
type=SERVICE_START msg=audit(1527782475.777:239): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=EnableHBA comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
type=AVC msg=audit(1527782475.779:240): avc: denied { execute } for pid=4223 comm="(leHBA.sh)" name="enableHBA.sh" dev="dm-0" ino=38164 scontext=system_u:system_r:init_t:s0 tcontext=unconfined_u:object_r:admin_home_t:s0 tclass=file permissive=0
type=SERVICE_STOP msg=audit(1527782475.782:241): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=EnableHBA comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
Run Code Online (Sandbox Code Playgroud)
和,
[root@localserver]# audit2allow -w -a
type=AVC msg=audit(1527782475.779:240): avc: denied { execute } for pid=4223 comm="(leHBA.sh)" name="enableHBA.sh" …Run Code Online (Sandbox Code Playgroud) 通常情况下,我会只是做scp file myuser@server1:~/(和输入密码),但现在我需要首先scp file myuser@server2:~/,然后ssh myuser@server2从我到服务器2,然后从Server2上做scp file myuser@server1:~/
我尝试这样做ssh -L 8888:server1:22 myuer@server2,它向我询问密码,就像我这样做时一样ssh myuser@server2,它只是连接到 server2 而不是 server1。
我怎样才能让它工作,以便我可以scp直接从我到 server1?