Description of problem: After making a new installation, changed the hostname (from "fedora" to "Atlantis"), then got this notificaiton. SELinux is preventing systemd-hostnam from 'write' accesses on the directory systemd. ***** Plugin catchall (100. confidence) suggests ************************** If you believe that systemd-hostnam should be allowed write access on the systemd directory 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 'systemd-hostnam' --raw | audit2allow -M my-systemdhostnam # semodule -X 300 -i my-systemdhostnam.pp Additional Information: Source Context system_u:system_r:systemd_hostnamed_t:s0 Target Context system_u:object_r:init_var_run_t:s0 Target Objects systemd [ dir ] Source systemd-hostnam Source Path systemd-hostnam Port <Unknown> Host (removed) Source RPM Packages Target RPM Packages SELinux Policy RPM selinux-policy-targeted-34.3-1.fc34.noarch Local Policy RPM selinux-policy-targeted-34.3-1.fc34.noarch Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name (removed) Platform Linux (removed) 5.11.15-300.fc34.x86_64 #1 SMP Fri Apr 16 13:41:48 UTC 2021 x86_64 x86_64 Alert Count 1 First Seen 2021-04-26 19:48:10 CDT Last Seen 2021-04-26 19:48:10 CDT Local ID b6310940-b45f-4c71-9741-0961dba7756f Raw Audit Messages type=AVC msg=audit(1619484490.498:1140): avc: denied { write } for pid=54163 comm="systemd-hostnam" name="systemd" dev="tmpfs" ino=2 scontext=system_u:system_r:systemd_hostnamed_t:s0 tcontext=system_u:object_r:init_var_run_t:s0 tclass=dir permissive=0 Hash: systemd-hostnam,systemd_hostnamed_t,init_var_run_t,dir,write Version-Release number of selected component: selinux-policy-targeted-34.3-1.fc34.noarch Additional info: component: selinux-policy reporter: libreport-2.14.0 hashmarkername: setroubleshoot kernel: 5.11.15-300.fc34.x86_64 type: libreport
Forgot to mention, changed the hostname with `sudo hostnamectl set-hostname Atlantis`
*** This bug has been marked as a duplicate of bug 1953060 ***