Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Permission denied when installing google-cloud-sdk #33

Closed
ollef opened this issue Jun 8, 2020 · 5 comments
Closed

Permission denied when installing google-cloud-sdk #33

ollef opened this issue Jun 8, 2020 · 5 comments
Labels
area/package/google-cloud-sdk Issue or PR that relates to //google-cloud-sdk kind/support Categorizes issue or PR as a support question

Comments

@ollef
Copy link

ollef commented Jun 8, 2020

I get the following error when trying to install google-cloud-sdk from AUR today:

% sudo aura -A google-cloud-sdk
aura >>= Determining dependencies...
aura >>= AUR Packages:
google-cloud-sdk
aura >>= Continue? [Y/n]
aura >>= Building google-cloud-sdk...
aura >>= Building failed. Would you like to see the error? [Y/n] y
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 76.4M  100 76.4M    0     0  18.4M      0  0:00:04  0:00:04 --:--:-- 18.9M
    google-cloud-sdk_295.0.0.orig.tar.gz ... Passed
    google-cloud-sdk.sh ... Passed
    0001-set-python2-for-dev-appserver-py.patch ... Passed
    0002-set-python2-for-endpointscfg-py.patch ... Passed
    0003-add-compdef-to-zsh-completion.patch ... Passed
Traceback (most recent call last):
  File "/tmp/google-cloud-sdk-1563092363463208678/google-cloud-sdk/pkg/google-cloud-sdk/opt/google-cloud-sdk/lib/googlecloudsdk/core/util/files.py", line 1227, in _FileOpener
    return io.open(path, mode, encoding=encoding)
PermissionError: [Errno 13] Permission denied: '/root/.config/gcloud/active_config'

Is there anything I need to do on my end to fix this, or is there a problem in the package?

@ollef
Copy link
Author

ollef commented Jun 8, 2020

As mentioned here, it works with makepkg -sr.

@sudoforge
Copy link
Owner

As mentioned in #14 (comment) (substitue aura for bauh):

The error you're encountering is occurring within bauh -- it appears that it is running some part of the process as root. This is apparent due to the fact that the bootstrapping script is attempting to open /root/.config/gcloud/active_config, instead of /home/$USER/.config/gcloud/active_config.

While I'd love to help you out, there is unfortunately nothing I can do within the scope of this package to support bauh. I recommend that you file an issue with the maintainers of bauh; you did a great job providing all of the necessary information here -- doing the same for them would be a good idea!

Feel free to reference this issue within the issue you file under the bauh project, so that the maintainers have the full context of the error.

In the mean time, you can manage the package manually, as your own user:

  • makepkg -sri will install a package's build dependencies, build the package, remove the builddeps, and then install the package.
  • sudo pacman -U <file> will install a package with the given filename.

I personally run my own Pacman repository with AUR packages. The helper I use (aurutils) does not run as root and therefore will not encounter the same class of errors you are currently experiencing. I'd be happy to talk about this more in depth if you're interested and need some additional help setting it up for yourself.

@ollef
Copy link
Author

ollef commented Jun 8, 2020

Cheers!

Would it be be worth mentioning this somewhere visible? I haven't encountered this problem when using my AUR helper with any other packages from the AUR.

Edit: Actually, this is probably due to some new behaviour in Aura. See fosskers/aura#606 (comment). Sorry about the noise.

@fosskers
Copy link

Sorry about this, I've fixed it on the Aura end.

@sudoforge
Copy link
Owner

@ollef Not to worry!

@fosskers Thanks for following up in this thread.

@sudoforge sudoforge added area/package/google-cloud-sdk Issue or PR that relates to //google-cloud-sdk kind/support Categorizes issue or PR as a support question triage/unresolved Indicates an issue that cannot or will not be resolved and removed state: declined triage/unresolved Indicates an issue that cannot or will not be resolved labels Feb 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/package/google-cloud-sdk Issue or PR that relates to //google-cloud-sdk kind/support Categorizes issue or PR as a support question
Projects
None yet
Development

No branches or pull requests

3 participants