cli icon indicating copy to clipboard operation
cli copied to clipboard

`dapr init` not creating the default components folder

Open sarsharma opened this issue 2 years ago • 4 comments

Expected Behavior

dapr init should create a default components folder ~/.dapr

Actual Behavior

The ~/.dapr folder is not created as part of dapr init Therefore dapr run fails with /home/azureuser/.dapr/components: no such file or directory

Steps to Reproduce the Problem

OS: Linux (Ubuntu 20.04) CLI Version: 1.8.1 Install the dapr cli using the script https://docs.dapr.io/getting-started/install-dapr-cli/ Run dapr init

Release Note

RELEASE NOTE:

sarsharma avatar Aug 26 '22 07:08 sarsharma

@sarsharma Is the dapr init command run as the same user as azureuser? Or is it run as root?

mukundansundar avatar Aug 26 '22 08:08 mukundansundar

It is run as root @mukundansundar

sarsharma avatar Aug 26 '22 09:08 sarsharma

When dapr init is run as root to install dapr, the .dapr folder is created under /root/.dapr In this case, dapr run will not work without sudo As a workaround, the /root/.dapr folder can be copied to the home directory of the user ~/.dapr This allows dapr run to work without sudo

sarsharma avatar Sep 12 '22 09:09 sarsharma

When dapr init is run as root to install dapr, the .dapr folder is created under /root/.dapr

#1056 should solve this issue by allowing sudo dapr init to specify --dapr-path to /home/azureuser/.dapr.

shubham1172 avatar Sep 24 '22 14:09 shubham1172

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue, help wanted or triaged/resolved) or other activity occurs. Thank you for your contributions.

dapr-bot avatar Oct 24 '22 14:10 dapr-bot

This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as pinned, good first issue, help wanted or triaged/resolved. Thank you for your contributions.

dapr-bot avatar Oct 31 '22 14:10 dapr-bot