Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

no that isn't what it means at all

a global /run/lock dir is an outdated mechanism not needed anymore

when the standard was written (20 years ago) it standardized a common way programs used to work around not having something like flock. This is also reflected in the specific details of FHS 3.0 which requires lock files to be named as `LCK..{device_name}` and must contain the process id in a specific encoding. Now the funny part. Flock was added to Linux in ~1996, so even when the standard was written it was already on the way of being outdated and it was just a matter of time until most programs start using flock.

This brings is to two ways how this being a issues makes IMHO little sense:

- a lot of use cases for /var/lock have been replaced with flock

- having a global writable dire used across users has a really bad history (including security vulnerabilities) so there have been ongoing affords to create alternatives for anything like that. E.g. /run/user/{uid}, ~/.local/{bin,share,state,etc.}, systemd PrivateTemp etc.

- so any program running as user not wanting to use flock should place their lock file in `/run/user/{uid}` like e.g. pipewire, wayland, docker and similar do (specifically $XDG_RUNTIME_DIR which happens to be `/un/user/{uid}`)

So the only programs affected by it are programs which:

- don't run as root

- don't use flock

- and don't really follow best practices introduced with the XDG standard either

- ignore that it was quite predictable that /var/lock will get limited or outright removed due to long standing efforts to remove global writable dirs everywhere

i.e. software stuck in the last century, or in this case more like 2 centuries ago in the 2000th

But that is a common theme with Debian Stable, you have to fight even to just remove something which we know since 20 years to be a bad design. If it weren't for Debians reputation I think the systemd devs might have been more surprised by this being an issue then the Debian maintainers about some niche tools using outdated mechanisms breaking.





> software stuck in the last century

OK, but suppose you have a piece of software you need to run, that's stuck in the last century, that you can't modify: maybe you lack the technical expertise, or maybe you don't even have access to the source code. Would you rather run it as root, or run it as a user that's a member of a group allowed to write to that directory?

The systemd maintainers (both upstream and Debian package maintainers) have a long history of wanting to ignore any use cases they find inconvenient.


most very old software will depend on many other parts so you anyway often have to run it in a vm with a old Linux kernel + distro release or similar

and if not, you can always put it in a container in which `/var/lock` permissions are changed to not being root-only. Which you probably anyway should do for any abandon ware.


It is my opinion that three things are true:

1) A piece of software can be complete.

2) It is virtuous when a piece of software is complete. We're freed to go do something else with our time.

3) It's not virtuous to obligate modifications to any software just because one has made changes to the shape of "the bikeshed".


That’s true and compatibility is a grace. Software shall not need every month an update. I sign of its quality.

Is this case, usage of /var/lock was clumsy for a long time. And not cleaning up APIs creates something horrible like Windows. API breaks should be limited, to the absolute minimum. The nice part here is, that we can adapt and patch code on Linux usually.

On the other side Linux (the kernel), GLIBC/STDLIBC++, Systemd and Wayland need to be API stable. Everybody dislikes API-Instability.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: