Permission denied when installing google-cloud-sdk
ollef opened this issue · comments
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?
As mentioned here, it works with makepkg -sr
.
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 asroot
. 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 ofbauh
; 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.
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.
Sorry about this, I've fixed it on the Aura end.