Skip to content

[Ubuntu 24.04] Name collision: flock conflicts whit util-linux's core flock utility #95

Open

Description

@francojleiva

first, thank you for your time and energy for developing and maintaining FlockPhp

While installing Flockphp on a Ubuntu 24.04, i notice a name collision with an essential system utility.

On ubuntu, the util-linux package provides a native command called flock, used for managing advisory files lock in shell scripts and cron jobs (/usr/bin/flock) or maybe (/home/linuxbrew/.bin/flock).

Since Flock's installer places its internal components under /usr/libexec/flockphp/flock, it can lead to confusion or require manual workarounds (like creating alias or custom symlinks or adjust the $PATH) to prevent overriding or clashing whit the system's core file-locking utility.

It would be helpful if the installation script or documentation explicitly addressed this namespace collision, perhaps by ensuring that the primary command exposed to the user is cleanly aliased or symlinked as flockphp (or a similiar non-colliding name) in /usr/local/bin/, rather than risking a direct conflict with the system's native flock

thanks for your work on the project!

Activity

  1. added theissue type on Nov 3, 2026
  2. added
    help wanted
    and removed on Nov 3, 2026
  3. added this to the v1.x milestone on Nov 3, 2026
  4. lukas-frey commented on Nov 3, 2026

    @lukas-frey
    Member

    Hi! We are aware of this and we approached this in two ways:

    1. our flock command should get prioritized - so all our commands run as they should and only if we don't know the arguments, we pass it to the Linux flock command.
    2. we have a "flk" alias for our command.

    It's not a perfect solution and improvements are welcome.

  5. modified the milestones: v1.1.0, v1.x on Nov 7, 2026
  6. francojleiva commented on Nov 7, 2026

    @francojleiva
    Author

    I'll try a few workarounds and keep you posted. Thanks a lot

  7. sharmis-tp commented on Nov 18, 2026

    @sharmis-tp

    On Ubuntu 24.04, the flock binary from util-linux sits in /usr/bin, so a PHP flock binary in PATH causes conflicts. I can explore a namespaced binary name or an install location that avoids the collision.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wanted

    Type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions