go-coffeeshop icon indicating copy to clipboard operation
go-coffeeshop copied to clipboard

Permission denied for cache folder

Open deulizealand opened this issue 2 years ago • 3 comments

Hi, i got an error when using dev container to open the project.

did i missing step or something ?

image

deulizealand avatar Dec 01 '22 02:12 deulizealand

what i do :

  • create folder manually
  • set permission
  • reopen with dev container This solve the issue

deulizealand avatar Dec 01 '22 02:12 deulizealand

I think the main reason is at https://github.com/thangchung/go-coffeeshop/blob/main/.devcontainer/devcontainer.json#L14 It runs as vscode user, but the code actually needs root to resolve pkg.

At the moment, we can sudo su into root user, then run go mod tidy, then it works normally.

I will fix this issue soon. Thanks for the finding

thangchung avatar Dec 01 '22 04:12 thangchung

Thanks for the Feedback.

deulizealand avatar Dec 01 '22 12:12 deulizealand

Fixed in the latest version in the main branch at https://github.com/thangchung/go-coffeeshop/commit/22d33190a0cf81630878e47bafae2de7c0abb783. Feel free to re-open it if there are still things else to fix.

thangchung avatar Dec 28 '22 08:12 thangchung