Fix pnpm Permission Denied Errors on macOS - npm Permission Denied on Lockfile or node_modules After Yarn-Nginx 502 Error in Docker: Causes and Solutions

Final checklist
- Confirm that the same symptom is gone after a restart or refresh.
- Keep the smallest working change and undo temporary diagnostic settings.