Linux: Guides and Practical Know-how | Page 12 | mironsoft Blog
Linux
-
Aug 12, 2025
A Bash script running as a daemon or long-lived process must handle SIGINT, SIGTERM and SIGHUP without leaving behind orphaned lock files or half-written output. A single trap call can register the same handler for several signals, but telling the signals apart inside the handler and avoiding double runs when combined with an EXIT trap takes a few extra tricks.
-
Aug 7, 2025
A --help text disappears the moment the terminal closes, while a man page stays behind as a searchable document in the system, reachable through man at any time. With pandoc converting a Markdown document, or help2man building directly from the --help output, that gap closes for a homegrown Bash script without any manual troff work.
-
Aug 4, 2025
A highly available cluster is only as good as the storage underneath it. As soon as application servers need to see the same files or data must survive a node failure, a distributed filesystem becomes a basic requirement, and the choice between GlusterFS, Ceph, NFS and DRBD determines performance, complexity and actual failure resistance.
-
Aug 4, 2025
Incorrectly set file permissions are one of the most common causes of hacked web servers and broken deployments. This guide explains the read/write/execute model, symbolic and octal chmod notation, the difference between chmod and chown, and a battle-tested permission baseline for Magento web roots with www-data ownership, 755 for directories, and 644 for files.
-
Aug 1, 2025
Not every background service has to be running the instant a machine boots, some are only needed sporadically and spend most of their time just occupying memory for nothing. Socket activation flips the classic startup model on its head: systemd opens the network socket at boot, but only starts the actual service behind it once the first connection actually arrives. For custom PHP background services in a Magento infrastructure, that is a simple path to a faster boot and lower resource usage, without giving up availability.
-
Jul 31, 2025
The first line of a Bash script decides which interpreter runs it, and that single line is one of the most common reasons a script fails to start on someone else's machine. The difference between #!/usr/bin/env bash and #!/bin/bash looks trivial but has concrete consequences on macOS, on Nix systems, and in containers with an unusual Bash install path.
-
Jul 30, 2025
rsync compares files one by one and burns valuable time on the comparison alone once millions of small files are involved. Btrfs send and receive sidesteps that problem entirely by determining the differences between two snapshots directly at the block level, without ever walking the file tree at all.
-
Jul 30, 2025
Compliance automation with OpenSCAP turns manual, error prone checklists into repeatable scans against recognized SCAP profiles. Using the SCAP Security Guide correctly, generating automatic remediation scripts and running the process continuously via Ansible and oscapd turns compliance into an observable operational state instead of a one time preparation for an audit.
-
Jul 27, 2025
A cron job that runs longer than its scheduled interval quietly starts a second time, even though the first run has not finished yet. Two parallel database exports, two simultaneous backup processes, or two import scripts blocking each other are the result, often without an immediately visible error message. This article shows how flock reliably prevents overlapping cron jobs, both directly in crontab and inside scripts, and where the limits of simpler locking approaches lie.
-
Jul 25, 2025
A single server is always a single point of failure. keepalived solves this problem with the VRRP protocol, letting two or more Linux servers share a virtual IP address and take over automatically on failure, with no expensive hardware load balancer required.