fix permission on local using root
This commit is contained in:
33
quick-fix.sh
Executable file
33
quick-fix.sh
Executable file
@@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "⚡ Quick fix for Docker development..."
|
||||
|
||||
# Quick permission fix without stopping containers
|
||||
echo "🔐 Quick permission fix..."
|
||||
sudo chmod -R 755 public
|
||||
sudo chmod 644 public/index.php
|
||||
|
||||
# Test if container can read the file
|
||||
echo "🧪 Testing file access..."
|
||||
docker exec ckb-app-dev test -r /var/www/html/public/index.php && echo "✅ File is readable" || echo "❌ File not readable"
|
||||
|
||||
# Test PHP execution
|
||||
echo "🐘 Testing PHP execution..."
|
||||
docker exec ckb-app-dev php -v
|
||||
|
||||
# Test Laravel
|
||||
echo "🎯 Testing Laravel..."
|
||||
docker exec ckb-app-dev php /var/www/html/artisan --version
|
||||
|
||||
# Test HTTP
|
||||
echo "🌐 Testing HTTP..."
|
||||
curl -s -o /dev/null -w "HTTP Status: %{http_code}\n" http://localhost:8000
|
||||
|
||||
echo ""
|
||||
echo "🔍 Debug info:"
|
||||
echo "Host file: $(ls -la public/index.php)"
|
||||
echo "Container file:"
|
||||
docker exec ckb-app-dev ls -la /var/www/html/public/index.php
|
||||
|
||||
echo ""
|
||||
echo "If still not working, run: chmod +x fix-permissions.sh && ./fix-permissions.sh"
|
||||
Reference in New Issue
Block a user