Add comprehensive permissions management for Docker bind mounts

NEW SCRIPT: Created scripts/fix-permissions.sh - automated permission fixer

Takes ownership of repository files, makes scripts executable, sets proper permissions

Verifies permissions are correct before proceeding

DOCKER COMPOSE: Added header comments explaining permission requirements

DOCUMENTATION: Updated README.md and QUICKSTART.md with permission setup steps

WHY CRITICAL: Docker bind mounts require proper file ownership to work correctly

USER EXPERIENCE: Single command ./scripts/fix-permissions.sh handles everything
This commit is contained in:
Alphaeus Mote
2025-10-23 16:45:19 -04:00
parent bf70fba516
commit 7058a96519
5 changed files with 196 additions and 9 deletions
+15 -3
View File
@@ -108,12 +108,24 @@ git clone https://github.com/freedbygrace/SQL.git
cd SQL
```
### 2. Make Scripts Executable
### 2. Set Proper Permissions
```bash
# Make all .sh files executable recursively
find . -name "*.sh" -exec chmod +x {} \;
# Option A: Use the automated script (recommended)
chmod +x scripts/fix-permissions.sh
./scripts/fix-permissions.sh
# Option B: Manual setup
sudo chown -R $USER:$USER . # Take ownership
find . -name "*.sh" -exec chmod +x {} \; # Make scripts executable
chmod -R 755 data/ schema/ scripts/ docker/ # Set directory permissions
```
**Why this is important:**
- ✅ Ensures your user owns all files (prevents permission denied errors)
- ✅ Makes all shell scripts executable
- ✅ Allows Docker to read/write bind-mounted directories (data/, schema/, docker/)
- ✅ Prevents "permission denied" errors with Docker volumes
### 3. Install Dependencies (Optional)
```bash
# Only if you don't have Docker, psql, etc.