edge / cli

Command line interface for the Edge network

Home Page:https://files.edge.network/cli/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Clarify need for, usage of sudo

annybs opened this issue · comments

commented

Ideally we don't use sudo, and in the development & production environments I've used I haven't had to. However, some CLI users report that sudo is necessary for in some of their interactions with CLI/Docker.

This is an open-ended issue to record findings and see if we can develop a clear set of instructions that a) seek to mitigate the use of sudo from setup time on, b) provide better usage documentation in scenarios where it may in fact be required.

commented

Some feedback from Discord:

My experience regarding the sudo

We restoring a wallet you can do with or without
But if you do without, then you have troubles when adding or starting the node

Because to access Docker you need sudo rights, and if you restore your wallet without sudo, then the add or start command don't find the wallet to link the node to your wallet

If needed I can do some tests on my node

There are some behavioural differences between Linux vs. MacOS/Windows due to the lack of direct volume access on the latter. However, that does mean the former must be concerned with permissions, as noted in #61 and #89. So, perhaps this is best fixed by simply unifying the volume read/write mechanism to go through a container irrespective of the platform, which then unloads the access problem onto Docker.

Also shared by the same user:

We are not currently looking at a rootless install but I'll definitely have another read of these when I'm a bit more able to work on CLI.

commented

Per #61

This is mitigated by changes in v1.7.2 #116 which use container-oriented volume management instead of interacting directly with the disk. This makes it simpler to configure sudoless Docker access without encountering file access issues.

The original behaviour of direct volume read/write can be reinstated by setting DOCKER_DIRECT_RW=true in the environment. The volume access issues obtain if not accessing Docker as root, but may be preferable for some users (particularly as it doesn't require pulling alpine to facilitate data transfers).

I am proceeding to close this issue as a duplicate.