fogbound.net




Wed, 28 Jan 2026

Network?

— SjG @ 4:43 pm

I clicked on a link to a web page I host on a Rocky Linux 9.7 VPS, and my browser stalled. That seemed strange, so I ssh-ed in to see if the web server was running correctly. ssh timed out.

So I used the VPS provider’s web-based console to log in, and found the networking was all dead. That was unexpected. After trying to remember the service name in this flavor/version, I executed systemctl restart NetworkManager.service and it was back … until I did a dnf update. Then it locked hard, and even the web-based console couldn’t log in for a while.

Tech support helped me track down the problem.

The VPS “only” had 2G of RAM, and that’s not enough on a modern Linux system to run a web server, database, and package manager. The dnf package manager subsystem was consuming all available memory when computing dependencies, and being killed by the oom-killer, leaving the system in weird states.

I ended up resizing the VPS to a mighty 4G RAM. It’s a few bucks more a month.

Makes me think of my first Linux box, which ran Debian Hamm in what I seem to think was 6M of memory.


Mon, 21 Apr 2025

Fixing an rsync issue under Mac OS 15.4

— SjG @ 1:18 pm

I keep some directories synchronized between my notebook and desktop with rsync. After upgrading my desktop to Mac OS 15.4.1, I started getting errors:

[sjg@BigThud 2025-04-21 13:01:05] ~/Documents/Backup
$ rsync -auP . sjg@10.3.2.xx:Documents/Backup
(sjg@10.3.2.xx) Password:
rsync: failed to set times on "/Users/sjg/Documents/Backup/Whatever": Operation not permitted (1)

Interestingly, ssh also showed an error:

[sjg@BigThud 2025-04-21 13:04:29] ~/Documents/Backup
$ ssh sjg@10.3.2.xx "ls /Users/sjg/Documents/Backup/Whatever"
(sjg@10.3.2.xx) Password:
ls: /Users/sjg/Documents/Backup/Whatever: Operation not permitted

On the desktop, I look again at Documents/Backup/Whatever, and the permissions are fine. What gives?

To make a long story short, something in the latest update on the desktop changed sshd‘s full disk access permission. Looking at System Preferences > Privacy & Security > Full Disk Access, sshd-keygen-wrapper was checked, so it should have been enabled. I tried toggling that, but it didn’t help.

Apparently, the sshd-keygen-wrapper was pointing at an old version or something? I had to go into System Preferences > General > Sharing and turn Remote Login off then on again, then go into System Preferences > Privacy & Security > Full Disk Access and re-enable sshd-keygen-wrapper.

Et voilà, I could ssh and rsync again!


Tue, 12 Nov 2024

Directory structure compare

— SjG @ 11:39 am

There’s gotta be a better way. But after a horrible upgrade process for a horrible commercial open-source product, I need to see which sub-directories from the old installation are missing in the new one. Don’t ask. I’ve literally been having nightmares about this upgrade.

Anyway, given tree1 and tree2 under some common point, I want a list of directories that exist in tree1 and don’t exist in tree2.

Here was my clumsy way of solving the problem.

cd tree1
find . -type d -print | sort > ../dirs_old
cd ../tree2
find . -type d -print | sort > ../dirs_new
cd ..
comm -23 dirs_old dirs_new


Fri, 11 Oct 2024

Quick file size computation

— SjG @ 2:13 pm

So your site was using too much bandwidth, and you converted all those animated .gif images to .webp using the WebPShop plugin.

But how many bytes have you actually saved? The command line will tell you:

ls -l *.gif | awk '{ print $5 }' | paste -sd+ - | bc 
ls -l *.webp | awk '{ print $5 }' | paste -sd+ - | bc 

Of course, this assumes that all the files in the current directory are the images and their conversions, and there aren’t a bunch of other files with one of those extensions. If that’s not the case, you’ll need to be more specific than *.extension in the ls command.


Tue, 10 Oct 2023

Which files are dupes

— SjG @ 4:56 pm

Over the past six months, I’d copied a set of files down from a network drive, then new ones were added to the network drive, and I’d copied some of the new ones down but maybe not all? How could I possibly clean up this mess?

Easily, it turns out!

$ diff -srq /mnt/Volumes/2023/Bank_Statements/ /local/receipts/2023/

This will list all the files, and mark if they’re only in the /mnt/Volumes/2023/Bank_Statements/ directory, only in the /local/receipts/2023/ directory, if the file exists in both places but is different, or if the file exists in both places and is identical. The -s flag means “report identical files,” the -r flag is to go recursively, and the -q flag just announces the files are the same/different rather than showing their differences.

This’ll work as long as the file names have not been changed. If file names have changed, it’ll require a more robust utility.