Remembering that time I discovered an upward directory traversal bug in a NextStep version of the chown command & wound up owning several dozen user accounts without ever touching a keyboard.

Somehow, my home dir wasn't owned by me anymore, so a sysadmin got root & ran `chown -R arielmt *` in my home dir, but the other user still owned dotfiles, so the sysadmin ran `chown -R arielmt .*` & took a long time to notice it was taking too long to run.

Follow

How? Well, FreeBSD's chown(8) manpage says this about -R:

Change the user ID and/or the group ID of the file hierarchies rooted in the files, instead of just the files themselves. Beware of unintentionally matching the ``..'' hard link to the parent directory when using wildcards like ``.*''.

Guess what matched & why it took so long.

Sign in to participate in the conversation
Computer Fairies

Computer Fairies is a Mastodon instance that aims to be as queer, friendly and furry as possible. We welcome all kinds of computer fairies!