gcloud installation permission issue on Ubuntu 12.04

前端 未结 1 1395
自闭症患者
自闭症患者 2021-01-04 11:26

I have installed PHP App Engine SDK first. Then, I installed Google Cloud SDK using:

sudo curl https://sdk.cloud.google.com | bash

but it\'

1条回答
  •  情话喂你
    2021-01-04 11:56

    This looks like a file permissions error in creating the directory /home/nikhil/.config/gcloud/logs/2015.07.04. Can you check the existence and file permissions for all of the parent directories?

    ls -ld /home/nikhil/
    ls -ld /home/nikhil/.config
    ls -ld /home/nikhil/.config/gcloud
    ls -ld /home/nikhil/.config/gcloud/logs
    ls -ld /home/nikhil/.config/gcloud/logs/2015.07.04
    

    Then upload the output to this question.

    My hunch is that you've run a Cloud SDK command as the root user (generally not recommended), which created the /home/nikhil/.config/gcloud directory with root as the owner. If this is the case, the command:

    sudo chown -R nikhil /home/nikhil/.config/gcloud
    

    may fix the issue.


    As an aside, the command sudo curl https://sdk.cloud.google.com | bash will not do what you want it to do; it executes curl as root, but the actual install will not happen as the root user. The Cloud SDK can be installed without root privileges, so I recommend simply curl https://sdk.cloud.google.com | bash.

    0 讨论(0)
提交回复
热议问题