-
Notifications
You must be signed in to change notification settings - Fork 11.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docker install error: EACCES: permission denied, open '/home/node/.n8n/config' still happens #11102
Comments
Hey @UlyssesWu, We have created an internal ticket to look into this which we will be tracking as "GHC-283" |
Hey @UlyssesWu This is not an issue we have seen for a long time, assuming the node user in the container owns the folder everything should be working. Can you share how you have n8n deployed? If you have upgraded from an older version (before 1.0) check out the information here: https://docs.n8n.io/1-0-migration-checklist/#docker |
The The assumption we make here is that when a user is mounting a directory into n8n container or using a volume, they are the ones responsible for making sure that n8n container has write permissions.
|
Thanks for the explaination, that was quick. Here is the screenshot for it's log: (If I mount the directory with readonly permission, the error will be I also noticed someone else was saying this issue still happens: saltyorg/Sandbox#301 (comment) Now I consider it might be a fault on the NAS OS side. Thanks again. |
To everyone who is using docker in NAS and facing the same problem, the workaround could be:
The problem is, if you mount |
Unfortunately, I encountered the same error on my Ubuntu host. See the Update
ErrorWhen
Details> docker compose up -d
[+] Running 4/4
✔ Network n8n_n8n Created 0.1s
✔ Container redis-n8n Healthy 6.1s
✔ Container postgres-n8n Healthy 6.1s
✔ Container n8n Started # This is with docker compose up -d
# /home/docker/n8n/n8n remains empty
> ls -ld /home/docker/n8n/{n8n,postgres_data,redis_data} /home/docker/n8n/
drwxr-xr-x 5 root root 4096 Oct 6 19:57 /home/docker/n8n/
drwxr-xr-x 2 root root 4096 Oct 6 19:57 /home/docker/n8n/n8n
drwx------ 19 70 root 4096 Oct 6 19:57 /home/docker/n8n/postgres_data
drwxr-xr-x 2 lxd root 4096 Oct 6 19:57 /home/docker/n8n/redis_data # Tested and set `init-data.sh` with/without `chmod +x init-data.sh`
> ls -lah
total 24K
drwxrwxr-x 2 admin admin 4.0K Oct 6 20:26 .
drwxrwxr-x 42 admin admin 4.0K Oct 6 12:43 ..
-rw-rw-r-- 1 admin admin 3.1K Oct 6 20:20 docker-compose.yml
-rw-rw-r-- 1 admin admin 307 Oct 6 20:27 .env
-rwxrwxr-x 1 admin admin 500 Oct 6 14:46 init-data.sh
-rw-rw-r-- 1 admin admin 572 Oct 6 14:40 README.md Do note: # docker-compose.yml
#
# https://github.com/n8n-io/n8n-hosting
## https://github.com/n8n-io/n8n-hosting/tree/main/docker-compose/withPostgresAndWorker
#
# Queue mode disabled for now. MVP and as simple as possible.
#
x-shared: &shared
# https://github.com/n8n-io/n8n/pkgs/container/n8n
# image: reg.<harbor>.com/ghcr.io/n8n-io/n8n:1.62.1
image: reg.<harbor>.com/ghcr.io/n8n-io/n8n:1.61.0
restart: unless-stopped
env_file:
- .env
environment:
# https://docs.n8n.io/hosting/configuration/environment-variables/#environment-variables-overview
- N8N_HOST=${SUBDOMAIN}.${DOMAIN_NAME}
- N8N_PORT=${N8N_PORT}
- N8N_PROTOCOL=http # HAProxy SSL offload
- NODE_ENV=production
- WEBHOOK_URL=https://${SUBDOMAIN}.${DOMAIN_NAME}/
- GENERIC_TIMEZONE=${TZ}
# - EXECUTIONS_MODE=queue # see https://docs.n8n.io/hosting/scaling/queue-mode/#queue-mode
- DB_TYPE=postgresdb
- DB_POSTGRESDB_HOST=postgres
- DB_POSTGRESDB_PORT=${POSTGRES_PORT}
- DB_POSTGRESDB_DATABASE=${POSTGRES_DB}
- DB_POSTGRESDB_USER=${POSTGRES_NON_ROOT_USER}
- DB_POSTGRESDB_PASSWORD=${POSTGRES_NON_ROOT_PASSWORD}
- QUEUE_BULL_REDIS_HOST=redis
- QUEUE_BULL_REDIS_PORT=${REDIS_PORT}
- QUEUE_HEALTH_CHECK_ACTIVE=true
links:
- postgres
- redis
volumes:
- "${N8N_HOME}/n8n:/home/node/.n8n"
depends_on:
redis:
condition: service_healthy
postgres:
condition: service_healthy
networks:
- n8n
services:
postgres:
# https://hub.docker.com/_/postgres/tags?page=1&name=alpine3.
image: reg.<harbor>.com/hub.docker.com/library/postgres:17.0-alpine3.20
container_name: postgres-n8n
# hostname: postgres-n8n
restart: unless-stopped
env_file:
- .env
ports:
- "${POSTGRES_PORT:-7432}:5432"
environment:
- POSTGRES_USER
- POSTGRES_PASSWORD
- POSTGRES_DB
- POSTGRES_NON_ROOT_USER
- POSTGRES_NON_ROOT_PASSWORD
volumes:
- "${N8N_HOME}/postgres_data:/var/lib/postgresql/data"
- ./init-data.sh:/docker-entrypoint-initdb.d/init-data.sh
healthcheck:
test:
[
"CMD-SHELL",
"pg_isready -h localhost -U ${POSTGRES_USER} -d ${POSTGRES_DB}",
]
interval: 5s
timeout: 5s
retries: 10
networks:
- n8n
# https://docs.n8n.io/hosting/scaling/queue-mode/#start-redis
redis:
# https://hub.docker.com/_/redis/tags?name=alpine3.
image: reg.<harbor>.com/hub.docker.com/library/redis:7.4.0-alpine3.20
container_name: redis-n8n
# hostname: redis-n8n
restart: unless-stopped
env_file:
- .env
ports:
- ${REDIS_PORT}:6379
volumes:
- "${N8N_HOME}/redis_data:/data"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 10
networks:
- n8n
n8n:
<<: *shared
container_name: n8n
ports:
- 5678:5678
# # Worker and queue mode: https://docs.n8n.io/hosting/scaling/queue-mode/#queue-mode
# n8n-worker:
# <<: *shared
# command: worker
# depends_on:
# - n8n
networks:
n8n: |
Bug Description
#1240
Same problem still happens on the latest version. I could not find the fix line in latest
docker/images/n8n/docker-entrypoint.sh
4a98fe4
To Reproduce
see #1240
Expected behavior
see #1240
Operating System
Linux (unknown version) with docker
n8n Version
1.61.0
Node.js Version
20.17.0
Database
SQLite (default)
Execution mode
main (default)
The text was updated successfully, but these errors were encountered: