Software⏱️ 3 min read📅 2026-06-11

How to Fix: docker-composer up error nginx: PermissionError: [Errno 13] Permission denied

Docker Compose PermissionError: Docker daemon not running, fix with docker-machine start default or run as root.

Quick Answer: Run `docker-compose --verbose up -d` and check if the Docker daemon is running. If not, try running `docker-machine start default`. Alternatively, run `sudo docker-compose up -d` to execute as root.

The error 'docker-compose up' yields PermissionError: [Errno 13] Permission denied when running docker-compose up. This issue affects users who are trying to create and run Docker containers using the Docker Compose tool.

This frustrating error can be caused by a lack of permissions or issues with the Docker daemon, making it difficult for users to manage their containerized applications.

🔍 Why This Happens

  • The primary reason for this error is that the user does not have the necessary permissions to run Docker commands. This can occur when the user's account lacks the required privileges to interact with the Docker daemon.
  • An alternative cause of this error could be an issue with the Docker daemon itself, such as a misconfigured socket or incorrect permissions on the Docker socket.

🔧 Proven Troubleshooting Steps

Running docker-compose up with elevated privileges

  1. Step 1: To resolve this issue, run `docker-compose up` with elevated privileges using the command `sudo docker-compose up -d`. This will allow you to override the default permissions and execute the command successfully.
  2. Step 2: Alternatively, consider adding the user running Docker Compose to the `docker` group, which allows them to interact with the Docker daemon without needing elevated privileges. To do this, run the command `usermod -aG docker $USER` and then log out and log back in for the changes to take effect.

Configuring Docker to use a Unix socket

  1. Step 1: If you are using a Linux system, try configuring Docker to use a Unix socket by running the command `sudo systemctl enable docker` and then restarting the Docker service with `sudo systemctl restart docker`. This may help resolve issues related to permission errors.
  2. Step 2: You can also check the Docker socket permissions by running the command `sudo ls -l /var/run/docker.sock`, which will display the current permissions. You can adjust these permissions as needed to ensure that your user account has the necessary access.

💡 Conclusion

By following one of these methods, you should be able to resolve the PermissionError: [Errno 13] Permission denied error when running docker-compose up and successfully create and run Docker containers for your application.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions