Skip to content

[FIX] 4.x: Identify Vito's own server by install marker, not by 'vito' user alone#1104

Open
erhanurgun wants to merge 1 commit into
vitodeploy:4.xfrom
erhanurgun:fix/4x-custom-provider-vito-marker
Open

[FIX] 4.x: Identify Vito's own server by install marker, not by 'vito' user alone#1104
erhanurgun wants to merge 1 commit into
vitodeploy:4.xfrom
erhanurgun:fix/4x-custom-provider-vito-marker

Conversation

@erhanurgun
Copy link
Copy Markdown
Contributor

Closes #1103

Custom::create rejects a server whenever id -u vito succeeds (app/ServerProviders/Custom.php ~line 86). That guard was added in #942 for the 3.x bare-metal installer which creates a vito system user (scripts/install.sh:50). In 4.x Vito ships as a Docker container and the installer no longer writes to the host, so any unrelated machine that has a vito Linux user (old bare-metal leftovers, unrelated tooling) is rejected.

Combining the user check with test -f /home/vito/vito/artisan (the path scripts/install.sh:197 clones into) keeps the original root-only bar and removes the false positive.

vendor/bin/phpunit --filter "vito" tests/Feature/ServerTest.php green. The existing "cannot create server on Vito server" test is updated to fake the new output token, and a sibling test covers the non-Vito host branch.

No migration. Open to a different marker if you prefer.

…' user alone

Custom::create rejected a server whenever `id -u vito` succeeded, which came
from vitodeploy#942 against the 3.x bare-metal installer (scripts/install.sh:50). In
4.x Vito ships as a Docker container and does not write a `vito` system user
to the host, so the old check false-positives on any unrelated host that
already has a `vito` Linux user. Combining the user check with
`test -f /home/vito/vito/artisan` (the clone path at scripts/install.sh:197)
keeps the original root-only bar and removes the false positive.
@erhanurgun erhanurgun marked this pull request as ready for review May 19, 2026 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant