beyondcode / beyondcode/herd-community

[Bug]: Cannot install services when /Users/Shared/Herd is owned by another user (Shared Users Folder permissions issue)

Open
#1,629 2 comments 0 reactions 0 assignees View on GitHub
macOS
Dominant language
No language data
Stars
122
Forks
1
PR merge metrics
No merged PRs in 30d

Description

### Platform

macOS

### Operating system version

macOS Sequoia 15.7.3 (24G419)

### System architecture

ARM64 (M1, M2, etc)

### Herd Version

1.25

### PHP Version

8.4

### Bug description

### Summary

On macOS with multiple local admin users, Herd cannot install database services (MySQL/MariaDB) if a different user previously installed Herd or a service first. The installer appears to write into a shared directory without validating write permissions/ownership up front, leading to either a crash (MariaDB) or an indefinite “spinning” install state (MySQL) with no activity.

Affected Versions

Reproduced across multiple Herd versions: 1.15 → 1.25.

Environment
• macOS
• Multiple local user accounts (both Admin)

Description / Impact

When the shared Herd directory is owned by another user (e.g., created by a prior user profile), Herd fails to install services for the current user. This blocks core functionality (installing database services) and presents as either a fatal error/crash or a stalled installation with no progress, which is difficult for users to diagnose.

Workaround

Delete the shared Herd directory and retry installation:
• Remove: /Users/Shared/Herd
• Re-run Herd and attempt the service install again.

Root Cause (Likely)

Herd installs/extracts services into a shared folder (/Users/Shared/Herd) but does not validate that the current user has write permissions (or that ownership/ACLs are correct) before attempting to write/extract.

Recommendation / Fix Proposal
1. Preflight permission checks: Before downloading/extracting services, verify write access to the target directory. If not writable, fail fast with a clear error, such as:
• “Herd cannot write to /Users/Shared/Herd because it is owned by another user. Please delete it or fix permissions.”
2. Improve error handling:
• Prevent crashes (MariaDB path) and prevent infinite spinners (MySQL path).
• Surface a visible failure state with actionable guidance.
3. Consider changing install location: If feasible, install services into the current user’s profile (e.g., ~/Library/Application Support/Herd/...) to avoid cross-user ownership issues entirely. If a shared folder is required, ensure Herd sets the correct ownership/ACLs during setup and handles multi-user scenarios explicitly.

### Steps to reproduce

1. Create (or use) User A (Admin) and User B (Admin) on the same Mac.
2. Log in as User A.
3. Install Herd.
4. Install a database service (e.g., MySQL or MariaDB) through Herd.
5. Uninstall that service through Herd (optional, but reproduces either way consistently).
6. Log out and switch to User B.
7. Open Herd and attempt to install a database service.

Expected Result

Herd successfully installs the selected service, or it fails fast with a clear, actionable error message if permissions prevent installation.

Actual Result
• MariaDB: Herd encounters a fatal error and crashes during install.
• MySQL: Herd downloads and starts extraction, then becomes stuck “spinning” indefinitely with no CPU or disk activity.

### Relevant log output

```shell
[herd-crashreport.txt](https://github.com/user-attachments/files/24847778/herd-crashreport.txt)
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.