I am running into this issue "Error creating root directory \"/chainlink\": chmod /chainlink: operation not permitted" when running the Chainlink node docker.

latestimage=$(curl -s -S "https://registry.hub.docker.com/v2/repositories/smartcontract/chainlink/tags/" | jq -r '."results"[]["name"]' | head -n 1)

cd /home/ec2-user/.chainlink

sudo docker run -d \
--log-driver=awslogs \
--log-opt awslogs-group=ChainlinkLogs \
--restart unless-stopped \
-u 1000:1000 \
--name chainlink \
-p 6688:6688 \
-v /home/ec2-user/.chainlink:/chainlink \
--env-file=/home/ec2-user/.chainlink/.env  smartcontract/chainlink:$latestimage local n \
-p /chainlink/.password \
-a /chainlink/.api

I ran sudo usermod -aG docker $USER and sudo chmod -R 777 /home/ec2-user/.chainlink and I keep getting the same error.

My .env, .api, and .password live in /home/ec2-user/.chainlink, and the ROOT variable in .env is set to ROOT=/chainlink


1 Answer 1


In your docker run command you have the option -u 1000:1000 which comes with certain privelages to the .chainlink directory.

To give the right permissions to the .chainlink directory, please try:

sudo chown 1000:1000 /home/ec2-user/.chainlink

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.