When firewalld blocks HTTP traffic even though port 80 is open: the services vs ports trap

Why firewalld blocks HTTP even when port 80 is open

I’ve run Fedora, CentOS, and RHEL for the past two decades, and firewalld is the default manager on those distros. It hides the nitty‑gritty nftables/iptables behind zones, services, and ports. That abstraction is handy, but it can also mask a subtle mismatch that ends up dropping HTTP traffic even though you’ve “opened” port 80. The culprit is almost always a services vs. ports trap.

[Read More]

How to make sudo leave a trace: a single auditd rule and logrotate config

Why a single auditd rule is better than scattered syslog entries

When you run sudo, you’re stepping into privileged territory. Most distros ship a sudo wrapper that dumps a message into syslog. That message can be noisy, hard to sift through, and it doesn’t survive a clean‑up or a reboot. A dedicated auditd rule, on the other hand, captures every sudo invocation in a structured, tamper‑evident format. Couple that with a tiny logrotate config, and you get a reliable audit trail that sticks around long after the machine has been rebooted or the disk wiped.

[Read More]

When /tmp fills a 1‑GB VPS in 15 minutes – how a simple tmpfs mount stops crashes

A 1‑GB VPS that dies in 15 minutes: the /tmp overflow problem

When a 1‑GB VPS runs a handful of services that write temporary files—apt‑get, pip, Docker, or even a simple web server—the /tmp directory can fill up faster than you think. Once the filesystem is full, many processes abort, the kernel starts killing tasks, and the machine can become unresponsive. The fix is surprisingly simple: mount /tmp as a tmpfs so it lives in RAM instead of on the disk.

[Read More]

How to use journalctl to pinpoint why a scheduled rsync job stalls during authentication

rsync scheduled jobs that stall on authentication: a journalctl‑first approach

When an rsync job launched by a systemd timer stops at the authentication step, the first place to look is the journal. The logs contain every attempt to open a connection, every key exchange, and every error message that the ssh daemon emits. With the right filters you can turn a vague “stalled” symptom into a concrete failure reason.

1. Know the unit that runs your rsync

Most modern distributions ship a template unit [email protected] that is started by a timer such as [email protected]. The instance name encodes the target host, e.g. [email protected]. Check the status:

[Read More]

When systemd‑resolved ignores /etc/hosts entries for local subdomains

Why /etc/hosts still matters

Even with systemd‑resolved becoming the default in most modern distros, that old /etc/hosts file is still the fastest way to pin a name to an IP on a single box or a tiny LAN. I’ve seen people drop the file entirely, thinking DNS is always the answer, and then run into a maze of “host not found” errors. The culprit? systemd‑resolved quietly skipping some /etc/hosts entries—especially the ones that look like subdomains of a local domain.

[Read More]

How to Fix Permission‑Denied Errors When Mounting Host Paths in Rootless Podman Containers

Why “Permission‑Denied” Pops Up When You Bind‑Mount in Rootless Podman

Rootless Podman runs containers as an unprivileged user. That’s great for security, but it also means the container’s view of the host filesystem is filtered through the user‑namespace mapping. When you try to bind‑mount a host path that the container’s UID/GID can’t access, the mount silently fails and the container reports a permission‑denied error. The problem is not the mount itself; it’s the mismatch between the host’s ownership/SELinux context and the container’s user namespace.

[Read More]

Granting Group Write Access on a Shared /srv/web Directory Using ACLs Without Changing File Ownership

The /srv/web directory is usually the spot where you keep static assets, CMS themes, or a shared workspace for a handful of developers. In most setups the files are owned by root or a dedicated web user, but the team still needs to edit or upload content without juggling ownerships. That’s where Access Control Lists (ACLs) come in handy: they let you grant a specific group write rights while keeping the original ownership hierarchy intact.

[Read More]

Recovering a Linux system that stuck in emergency mode after an initramfs update

Emergency mode after an initramfs update

After a kernel upgrade the initramfs is rebuilt automatically.
If a module slips through the cracks or a hook gets mis‑configured, the machine will drop into emergency mode with a terse prompt:

Emergency mode – root account password required

You’re not stuck forever; the problem is almost always a missing or mis‑mounted filesystem, a bad fstab, or a broken initramfs that can’t mount the root partition. Below is a practical walk‑through that keeps your data safe and pays attention to security.

[Read More]

Sharing a folder with multiple users using ACLs instead of chmod 777

If you’re sharing a directory between a handful of people, the first thing most folks do is chmod 777. I’ve seen that go wrong when a rogue script deletes everything. ACLs let you fine‑tune permissions per user or group while keeping the directory’s ownership sane.

Below is a step‑by‑step guide that shows how to enable ACLs, set up a shared folder, and maintain it securely on a modern Linux system (kernel 6.x, systemd 250+). The examples use setfacl and getfacl, the standard ACL utilities that ship with most distributions.

[Read More]

A single‑line cron that runs rkhunter nightly and emails you only on matches

Why rkhunter Still Matters

Rootkit detection tools are the unsung heroes of a hardened Linux box.
Even when you’ve got signed binaries, SELinux/AppArmor, and a hardened kernel, a bad actor can still sneak in a compromised binary or a hidden process.
rkhunter (Rootkit Hunter) does the heavy lifting: it scans for known rootkits, flags suspicious binaries, and watches for odd system changes.
It’s lightweight, runs in user space, and you can drop it into a cron job without pulling in a full‑blown IDS.
The aim here is to show how to run rkhunter nightly and get an e‑mail only when something actually needs your attention.

[Read More]