Stupid SELinux workarounds I’ve had to do over the years

2025-07-30

This list will go on growing…

Apache userdirs

$ chmod 755 ~/public_html
$ chmod +x ~/
# chcon -R -t httpd_sys_content_t ~/public_html

google-authenticator

Append auth required pam_google_authenticator.so secret=/home/${USER}/.ssh/.google_authenticator to /etc/pam.d/sshd and

$ mv .google_authenticator .ssh
# systemctl restart sshd

(Actually I don’t think this has anything to do with SELinux, idk what this is doing here)

Non-standard sshd port

# semanage port -a -t ssh_port_t -p tcp PORT

– rb

Home