You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LCORE-1874: Document credential file permission issues in containers
Add troubleshooting section for PermissionError with mounted credential files (VertexAI, GCP).
Documents root cause: container runs as UID 1001, cannot read files with 600 permissions owned by different host UID.
Solutions:
- chmod 644 (works on all platforms)
- ACLs on Linux (setfacl -m u:1001:r)
- macOS limitation noted (BSD ACLs don't support numeric UIDs for non-existent users)
This is expected container behavior, not a bug. Container runs as non-root user for security.
google.auth._default.load_credentials_from_file() failed to open credentials file
606
+
```
607
+
608
+
**Cause:**
609
+
The llama-stack container runs as UID 1001 (non-root user for security). When you mount a credentials file with restrictive permissions (`600`), the container user cannot read it:
610
+
611
+
-**Host file:** Owned by your user (e.g., UID 1000) with permissions `600` (owner-only)
612
+
-**Container process:** Runs as UID 1001 (different user)
613
+
-**Result:** Permission denied - UID 1001 cannot read a file owned by UID 1000 with `600` permissions
614
+
615
+
**Solutions:**
616
+
617
+
**Option 1: Use 644 permissions** (Works on all platforms)
618
+
```bash
619
+
chmod 644 /path/to/vertex-credentials.json
620
+
```
621
+
622
+
Allows container user (UID 1001) to read the file as "others" while keeping write access restricted to owner.
623
+
624
+
**Security note:** File becomes world-readable on the host. Acceptable for development environments where access to the filesystem is already restricted to your user account.
625
+
626
+
**Option 2: Use ACLs** (Linux only - more secure)
627
+
628
+
ACLs (Access Control Lists) allow you to grant read access to UID 1001 specifically without making the file world-readable. **Note:** This only works on Linux systems, not macOS.
This grants read-only access to UID 1001 (container user) without changing base permissions or making the file world-readable.
649
+
650
+
**macOS note:** macOS uses BSD ACLs and cannot assign numeric UID-based ACLs to non-existent host users. If you are testing locally on macOS, you must temporarily use `chmod 644` to allow the container access, but **be aware that this makes the credentials file world-readable on your host machine.** Alternately, ensure your local user matches the container's execution environment.
651
+
652
+
**Why this happens:**
653
+
This is expected container behavior. The container runs as a non-root user (UID 1001) for security - see `USER 1001` in `deploy/llama-stack/test.containerfile`. Files with `600` permissions are only accessible to their owner, and the container's UID differs from your host UID.
654
+
655
+
**Production recommendation:**
656
+
For production deployments, avoid mounting credential files entirely. Instead use:
0 commit comments