Skip to content

Commit 8f67192

Browse files
authored
Merge pull request #20946 from sean-freeman/faq_permissions
docs: update FAQ with file permissions behavior
2 parents 108b5e8 + bd09ce0 commit 8f67192

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

docs/FAQ.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,18 @@ Did you `chown root /Applications/TextMate.app`? Probably not. So is it that imp
124124

125125
If you need to run Homebrew in a multi-user environment, consider creating a separate user account specifically for use of Homebrew.
126126

127+
## What is the default ownership and permissions used by Homebrew?
128+
129+
First, see previous question regarding sudo.
130+
131+
Ownership on macOS, all subdirectories and files use a forced default of `admin` user group (instead of lower default user group `staff`) and the current user that executed the installation.
132+
133+
Ownership on Linux, all subdirectories and files default to the current user and the user group that executed the installation.
134+
135+
Permissions for all subdirectories and files use `0755 (u=rwx,g=rx,o=rx)` on both macOS and Linux, permitting only the current user to replace binaries (avoidance of malicious changes) while allowing all users to execute binaries. Note: Although, Homebrew is single-user design and it is not advised to execute using a separate user account specifically for use of Homebrew.
136+
137+
When any binary is executed by any macOS user, it will inherit the permissions of the `admin` user group and be able to read all files on the device; Homebrew on macOS is not restricted to only files created by the user under $HOME directory path (e.g. $HOME/Applications or $HOME/Downloads). This permits binaries installed by Homebrew to access and amend macOS itself (e.g. /Applications, /Library, /System).
138+
127139
## Why isn’t a particular command documented?
128140

129141
If it’s not in [`man brew`](Manpage.md), it’s probably an [external command](External-Commands.md) with documentation available using `--help`.

0 commit comments

Comments
 (0)