|
| 1 | +<div align="center"> |
| 2 | + <br> |
| 3 | + <a href="#quick-start"> |
| 4 | + <img src="https://img.shields.io/badge/MAC_MEDIA_STACK_PERMISSIONS-00C853?style=for-the-badge&logo=apple&logoColor=white" alt="Mac Media Stack Permissions" height="40" /> |
| 5 | + </a> |
| 6 | + <br><br> |
| 7 | + <strong>Audit and fix file permissions across your *arr Docker stack on macOS</strong> |
| 8 | + <br> |
| 9 | + <sub>Permissions are the #1 headache with Docker media stacks on macOS.<br>This tool finds and fixes permission issues before they break your setup.</sub> |
| 10 | + <br><br> |
| 11 | + <img src="https://img.shields.io/badge/Docker-2496ED?style=flat-square&logo=docker&logoColor=white" /> |
| 12 | + <img src="https://img.shields.io/badge/OrbStack-000000?style=flat-square&logo=data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIgZmlsbD0id2hpdGUiLz48L3N2Zz4=&logoColor=white" /> |
| 13 | + <img src="https://img.shields.io/badge/macOS-000000?style=flat-square&logo=apple&logoColor=white" /> |
| 14 | + <img src="https://img.shields.io/badge/Bash-4EAA25?style=flat-square&logo=gnubash&logoColor=white" /> |
| 15 | + <br><br> |
| 16 | + <img src="https://img.shields.io/github/stars/liamvibecodes/mac-media-stack-permissions?style=flat-square&color=yellow" /> |
| 17 | + <img src="https://img.shields.io/github/license/liamvibecodes/mac-media-stack-permissions?style=flat-square" /> |
| 18 | + <br><br> |
| 19 | +</div> |
| 20 | + |
| 21 | +## The Problem |
| 22 | + |
| 23 | +File permissions are the most common issue with Docker media stacks on macOS. Every other post on r/selfhosted and r/radarr is someone debugging why Sonarr can't write to their download folder or Radarr can't move files after import. |
| 24 | + |
| 25 | +The usual causes: |
| 26 | +- PUID/PGID set differently across containers |
| 27 | +- Volume mounts owned by root instead of your user |
| 28 | +- macOS privacy controls blocking Docker's disk access |
| 29 | +- .env file missing or has stale user IDs |
| 30 | + |
| 31 | +This script audits everything in one pass and tells you exactly what's wrong. |
| 32 | + |
| 33 | +## What It Checks |
| 34 | + |
| 35 | +| Check | What It Looks For | |
| 36 | +|-------|------------------| |
| 37 | +| **Runtime detection** | OrbStack or Docker Desktop installed and running | |
| 38 | +| **PUID/PGID consistency** | All containers using the same user/group IDs | |
| 39 | +| **.env validation** | PUID/PGID set and matching your current user | |
| 40 | +| **Volume permissions** | Host directories owned by the expected user | |
| 41 | +| **Full Disk Access** | Docker/OrbStack has macOS disk access permissions | |
| 42 | +| **Compose config** | docker-compose.yml exists and is parseable | |
| 43 | + |
| 44 | +## Quick Start |
| 45 | + |
| 46 | +```bash |
| 47 | +git clone https://github.com/liamvibecodes/mac-media-stack-permissions.git |
| 48 | +cd mac-media-stack-permissions |
| 49 | +bash fix-permissions.sh |
| 50 | +``` |
| 51 | + |
| 52 | +Or run directly: |
| 53 | + |
| 54 | +```bash |
| 55 | +curl -fsSL https://raw.githubusercontent.com/liamvibecodes/mac-media-stack-permissions/main/fix-permissions.sh | bash |
| 56 | +``` |
| 57 | + |
| 58 | +## Usage |
| 59 | + |
| 60 | +```bash |
| 61 | +# Audit only (default, no changes made) |
| 62 | +bash fix-permissions.sh |
| 63 | + |
| 64 | +# Audit a custom media directory |
| 65 | +bash fix-permissions.sh --path /Volumes/Media |
| 66 | + |
| 67 | +# Fix all permission issues |
| 68 | +bash fix-permissions.sh --fix |
| 69 | + |
| 70 | +# Fix with custom path |
| 71 | +bash fix-permissions.sh --fix --path /Volumes/Media |
| 72 | +``` |
| 73 | + |
| 74 | +## Example Output |
| 75 | + |
| 76 | +``` |
| 77 | +============================== |
| 78 | + Permission Audit |
| 79 | +============================== |
| 80 | +
|
| 81 | +OK Runtime: OrbStack detected |
| 82 | +OK docker-compose.yml found at /Users/you/Media/docker-compose.yml |
| 83 | +OK .env PUID (501) matches current user |
| 84 | +OK .env PGID (20) matches current group |
| 85 | +WARN PUID mismatch: sonarr uses 1000, expected 501 |
| 86 | +OK config/ owned by you (501:20) |
| 87 | +FAIL downloads/ owned by root (0:0), expected 501:20 |
| 88 | +WARN Full Disk Access not confirmed for OrbStack |
| 89 | +
|
| 90 | +============================== |
| 91 | + Summary: 4 passed, 2 warnings, 1 failed |
| 92 | +============================== |
| 93 | +``` |
| 94 | + |
| 95 | +## Fix Mode |
| 96 | + |
| 97 | +Run with `--fix` to automatically resolve permission issues: |
| 98 | + |
| 99 | +- Runs `chown -R` on directories with wrong ownership |
| 100 | +- Reports what was changed |
| 101 | + |
| 102 | +The script never modifies docker-compose.yml or .env. It only fixes file ownership on disk. |
| 103 | + |
| 104 | +## Works With |
| 105 | + |
| 106 | +- [mac-media-stack](https://github.com/liamvibecodes/mac-media-stack) — One-command Plex + Sonarr + Radarr setup |
| 107 | +- [mac-media-stack-advanced](https://github.com/liamvibecodes/mac-media-stack-advanced) — Power-user setup with transcoding, quality profiles, and automation |
| 108 | + |
| 109 | +## Author |
| 110 | + |
| 111 | +Built by [@liamvibecodes](https://github.com/liamvibecodes) |
| 112 | + |
| 113 | +## License |
| 114 | + |
| 115 | +[MIT](LICENSE) |
0 commit comments