vmware-archive / lattice-cli

Lattice CLI
BSD 2-Clause "Simplified" License
8 stars 5 forks source link

ltc create command fails on ubuntu, permission denied #15

Closed kdvolder closed 9 years ago

kdvolder commented 9 years ago

I was trying out the instructions (https://docs.google.com/a/pivotal.io/document/d/1WWoQ_d5nR4-P6VfLbAAbzOZIvRj-Xdff2hsjM_ZWRUQ/edit#)

I'm on Ubuntu 12.04. I've got the current release versions of docker and virtualbox installed.

        kdvolder@lebun:~/git/lattice$ docker --version
        Docker version 1.5.0, build a8a31ef

VirtualBox 4.3_4.3.22-98236~Ubuntu~precise_amd64.deb

When I run the command to create the sample lattice-app I get this:

         $ ltc create lattice-app cloudfoundry/lattice-app
         Error fetching image metadata: open /etc/docker/certs.d/index.docker.io: permission denied
cf-gitbot commented 9 years ago

We have created an issue in Pivotal Tracker to manage this. You can view the current status of your issue at: https://www.pivotaltracker.com/story/show/89325040.

kdvolder commented 9 years ago

I see someone commented on the pivotal tracker issue but don't seem to have any way of replying back over there. So... I'll comment here and hope gitbot will crosspost.

My docker is setup so that I do not need to run with 'sudo'. This is done by adding the user who runs docker commands to the 'docker' group.

davidwadden commented 9 years ago

I was able to reproduce this issue today. I had to try and recreate how you installed docker. I followed the instructions from https://docs.docker.com/installation/ubuntulinux/ to add the docker repository to my apt sources list to get the latest docker v1.5.0, as the default apt repos have an old version of docker (~v1.0.1).

ltc itself doesn't depend on having docker installed - prior to installing docker to my linux box, i could create an app on lattice with no problem. it looks like this package provided by docker is setting the /etc/docker folder to have 000 for file permissions, and ltc's docker api call attempts to read from a file underneath this folder, which results in the permission denied error.

root@ubuntu-trusty-64:/etc# find docker -ls
284123    4 d---------   2 root     root         4096 Mar 16 15:15 docker
284151    4 ----------   1 root     root          281 Mar 16 15:15 docker/key.json

As a quick workaround, I ran sudo chmod 755 /etc/docker to avoid the permission denied error.

HTH, David

kdvolder commented 9 years ago

Thank you, that worked. Do you think that is a problem with the docker package I installed?

As far as I can tell docker seems to work fine when I just run docker commands. But I have not used it except for a few simple 'hello world' tests. Just wondering if this problem needs a follow up like, report a problem with maintainers of the docker package I installed.

davidwadden commented 9 years ago

Yes, others have reported this issue -- I think Docker needs to correct the permissions in their apt package they publish. I would think this warrants an issue to be reported to the Docker maintainers.

kdvolder commented 9 years ago

I've filed an issue against docker: https://github.com/docker/docker/issues/11927