Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

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

未关闭
#1,629 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
冷清
技术栈
macos, mariadb, mysql

调研方向

首先针对 /Users/Shared/Herd 重现双用户安装流程,然后检查链接的 herd-crashreport.txt 以及 MySQL 和 MariaDB 的安装路径。完成的标准是:安装程序要么为第二个用户成功完成,要么显示一个可采取行动的权限错误并停止,且不会崩溃或无限旋转。

由索引模型根据 Issue 内容生成。

描述

macOS
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
[herd-crashreport.txt](https://github.com/user-attachments/files/24847778/herd-crashreport.txt)
主要语言
没有语言数据
星标
124
派生
1
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

beyondcode/herd-community 的其他 Issue

查看 beyondcode/herd-community 的全部 Issue

相似的 Issue

更多 Databases Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。