You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Test with "setenforce 1". Downloading with curl fails.
[root@asus ~]# useradd test
[root@asus ~]# machinectl shell test@
Connected to the local host. Press ^] three times within 1s to exit session.
[test@asus ~]$ podman pull -q ghcr.io/eriksjolund/socket-activate-httpd:0.2.0
f6067b3d4430fcefc1425c8d0cebe19557ac777168f5e6f2b94b153dc93dadd5
[test@asus ~]$ systemd-socket-activate -l 8080 podman run --rm --network=none ghcr.io/eriksjolund/socket-activate-httpd:0.2.0
Listening on [::]:8080 as 3.
Communication attempt on fd 3.
Execing podman (podman run --rm --network=none ghcr.io/eriksjolund/socket-activate-httpd:0.2.0)
[Mon May 23 04:04:22.633888 2022] [core:crit] [pid 1:tid 1] (13)Permission denied: AH00067: make_sock: for address [::18d2:cd31:ff7f:0]:8080, apr_socket_opt_set: (SO_REUSEADDR)
AH00526: Syntax error on line 47 of /etc/httpd/conf/httpd.conf:
Failed to setup socket passed by systemd using socket activation
[test@asus ~]$
After starting the command systemd-socket-activate above, in another shell I ran
Test with "setenforce 0". Downloading with curl succeeds.
[test@asus ~]$ systemd-socket-activate -l 8080 podman run --rm --network=none ghcr.io/eriksjolund/socket-activate-httpd:0.2.0
Listening on [::]:8080 as 3.
Communication attempt on fd 3.
Execing podman (podman run --rm --network=none ghcr.io/eriksjolund/socket-activate-httpd:0.2.0)
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
In another shell the download was successful
[test@asus ~]$ curl -o /tmp/file localhost:8080
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 8474 100 8474 0 0 42423 0 --:--:-- --:--:-- --:--:-- 42582
[test@asus ~]$
Query the audit daemon logs with ausearch and analyze them with audit2allow
I guess this warning message (seen above) is not relevant to the SELinux problem
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
I forgot to mention that the container image was built from this Containerfile (with comments removed)
FROM docker.io/library/fedora:latest
RUN dnf install -y httpd
RUN sed -i "s/Listen 80/Listen 127.0.0.1:8080/g" /etc/httpd/conf/httpd.conf
CMD ["/usr/sbin/httpd", "-DFOREGROUND"]
Another thing:
When running it as a systemd user service instead, it worked with setenforce 1.
I'll try to investigate it a little more later. Maybe the SELinux problem could be worked around with a reconfiguration of the Apache HTTP server? Just a speculation....
The text was updated successfully, but these errors were encountered:
Test with "setenforce 1". Downloading with curl fails.
After starting the command systemd-socket-activate above, in another shell I ran
Test with "setenforce 0". Downloading with curl succeeds.
In another shell the download was successful
Query the audit daemon logs with ausearch and analyze them with audit2allow
Extra note
I guess this warning message (seen above) is not relevant to the SELinux problem
About the system
Update 1
I forgot to mention that the container image was built from this Containerfile (with comments removed)
Another thing:
When running it as a systemd user service instead, it worked with
setenforce 1
.I'll try to investigate it a little more later. Maybe the SELinux problem could be worked around with a reconfiguration of the Apache HTTP server? Just a speculation....
The text was updated successfully, but these errors were encountered: