'Azure Bash - Permission denied when running . <(sudo wget -q -O - https://aka.ms/microservices-data-aspnet-core-setup)

I'm trying to setup my environment to learn azure from the Microsoft learning page https://docs.microsoft.com/en-us/learn/modules/microservices-data-aspnet-core/environment-setup

but when i run . <(sudo wget -q -O - https://aka.ms/microservices-data-aspnet-core-setup) to pull the repo and run the services, i get the error below

~/clouddrive/aspnet-learn/modules/microservices-data-aspnet-core/setup ~/clouddrive/aspnet-learn
~/clouddrive/aspnet-learn

bash: /home/username/clouddrive/aspnet-learn/src/deploy/k8s/quickstart.sh: Permission denied
bash: /home/username/clouddrive/aspnet-learn/src/deploy/k8s/create-acr.sh: Permission denied
cat: /home/username/clouddrive/aspnet-learn/deployment-urls.txt: No such file or directory

this used to work until it stopped working and I'm not sure what caused it to break or how to fix it.

I've tried deleting the 'Storage account' and the resources, but doesn't seem to work. also, when i delete the storage account and create a new one then try again, it seems to have the old data stored and i need to run a remove, so somehow this data isnt really being deleted when i delete the 'Storage account'

Before running this script, please remove or rename the existing /home/username/clouddrive/aspnet-learn/ directory as follows:
Remove: rm -r /home/username/clouddrive/aspnet-learn/

enter image description here

any idea what is wrong here, or how i can actually reset this to work like a new storage?

Note: I saw some solutions which say to start with sudo, for elevated permission, but didnt manage to get this to work



Solution 1:[1]

  • I have done the repro by following the given document
  • Able to deploy a modified version of the eShopOnContainers reference app

enter image description here

enter image description here

enter image description here

  • Again I executed the same command ,
 . <(wget -q -O - https://aka.ms/microservices-data-aspnet-core-setup)

got the same error which you have got

enter image description here

  • If we try to run the deploy script without cleaning the already created resource/app,will get the above error.

  • If you want to re-run the setup script, run the below command first to clean the resource

cd ~ && \
 rm -rf ~/clouddrive/aspnet-learn && \
 az group delete --name eshop-learn-rg --yes

OR

Remove: rm -r /home/username/clouddrive/aspnet-learn/
Rename: mv /home/username/clouddrive/aspnet-learn/ ~/clouddrive/new-name-here/ 

The above command removes or renames the existing /home/username/clouddrive/aspnet-learn/ directory

  • Now you can run the script again

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1