Repository navigation
Conversation
install-helper.sh recursively chowns the entire shared /Library/PrivilegedHelperTools directory. When another app has already installed a macOS-protected helper bundle there (e.g. ChromeRemoteDesktopHost.app, which carries a com.apple.macl attribute), chown returns "Operation not permitted" on those files. Under `set -euo pipefail` the script aborts right there — before it copies the LaunchDaemon plist and runs `launchctl bootstrap`. The helper binary and dylibs land on disk, but the daemon is never registered, so the install appears to finish while the helper stays permanently unreachable. Only chown/chmod the files this tool actually installs (the helper binary and its libtetherkit/libusb dylibs) instead of the entire shared directory. Other apps' helpers in the same directory are left untouched.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request updates the ownership and permissions logic in the
install-helper.shscript to more safely handle files in/Library/PrivilegedHelperTools, especially when dealing with files protected by macOS access controls. The changes ensure that only the relevant files installed by this tool are modified, preventing errors that could previously cause the installation to appear successful even when it was incomplete.Ownership and permissions handling improvements:
chownto operate only on the top-level${TOOLS_DIR}directory instead of recursively, to avoid errors with protected bundles in/Library/PrivilegedHelperTools.${INSTALL_PATH}and for specific.dylibfiles (libtethernet*.dylibandlibusb-*.dylib) if they exist, usingchown -hto handle symlinks safely.chmod 444to the relevant.dylibfiles, avoiding unintended changes to unrelated files.