Permission Denied in Docker-Compose on Linux [Closed]
(base) a@a-ThinkPad-T440:~$ docker-compose version
bash: /usr/local/bin/docker-compose: Permission denied

I have big problem with docker-compose, I tried to upgrade docker-compose to 1.25 with curl but now I have no permission for docker-compose (I have linux ubuntu)

3

As far as I can understand you are using docker's source to install docker-compose and you forgot the second step. Source for complete installation.

As second step states. Apply executable permissions to the binary:

sudo chmod +x /usr/local/bin/docker-compose;

In addition to the comments provided in the question

sudo usermod -aG docker $USER                  # to add myself to docker group
sudo chgrp docker /usr/local/bin/docker-compose     # to give docker-compose to docker group,
sudo chmod 750 /usr/local/bin/docker-compose   # to allow docker group users to execute it

You might want to try running newgrp docker

5
Elena Rostova

Elena Rostova

Lead Health, Wellness & Medical Journalist

Elena Rostova holds a Master's degree in Public Health Journalism. She covers groundbreaking medical research, holistic wellness trends, mental health awareness, and nutritional science.

Share this article
Twitter Facebook Pinterest