isDot()) continue; chmodRecursive($item->getPathname(), $filePerm, $dirPerm); } return chmod($path, $dirPerm); } return false; } $storagePath = __DIR__ . '/storage'; chmodRecursive($storagePath); echo "✅ Permissions fixed for storage folder."; ?>