api_websocket报错误:Permission denied: '/home/dify'
环境:
dify:1.14.2
问题:
api_websocket-1 | Running migrations
api_websocket-1 | Preparing database migration...
api_websocket-1 | Database migration skipped
api_websocket-1 | [2026-06-11 07:24:48 +0000] [1] [INFO] Starting gunicorn 26.0.0
api_websocket-1 | [2026-06-11 07:24:48 +0000] [1] [INFO] Listening at: http://0.0.0.0:5001 (1)
api_websocket-1 | [2026-06-11 07:24:48 +0000] [1] [INFO] Using worker: geventwebsocket.gunicorn.workers.GeventWebSocketWorker
api_websocket-1 | [2026-06-11 07:24:49 +0000] [16] [INFO] Booting worker with pid: 16
api_websocket-1 | [2026-06-11 07:24:49 +0000] [1] [ERROR] Control server error: [Errno 13] Permission denied: '/home/dify'
api_websocket-1 | gRPC patched with gevent.
api_websocket-1 | psycopg2 patched with gevent.
解决办法:
1.停掉容器
cd /opt/dify/docker
docker compose down
2.递归把目录归属改成1001:1001(dify 用户)
chown -R 1001:1001 ./volumes/app
3.给足读写执行权限
chmod -R u+rwX,go+rX ./volumes/app
4.启动
docker compose up -d
5.再次查看日志
docker compose logs -f api_websocket
浙公网安备 33010602011771号