Recommended Give the directory to 1000:1000
Stop the container, run these for each path, then start it again with docker compose up -d. The path is explicit: never run a recursive chown on a parent directory.
Changes the server. These commands change ownership on the server. Read them, check the path, and stop the container first.
sudo mkdir -p ./n8n-dataChanges the server Creates the directory if it is missing.sudo chown -R 1000:1000 ./n8n-dataChanges the server Gives the directory and everything in it to the container's user.
sudo mkdir -p ./n8n-data
sudo chown -R 1000:1000 ./n8n-data