Hi there, I am trying to understand what has changed that when running Node Launchpad as root, creates nodes data directory in /root/.local/share/ ? This doesn’t work because user ant won’t be able to access this directory. I’m trying to fix this through a PR but i was wondering how would it run earlier. I have the following questions:
would it create node data directory in /var/antctl/services(found references to this path in the code, hence assuming).
what about windows platform, what would be equivalent to /var/antctl/services?. have we defined default a path for nodes data directory?
Can you expand a bit about directories getting messed up? If all of the nodes data goes into a specific directory and proper permissions are given to the ant user, isn’t this viable?
Furthermore, without root, the antnode service stops when user logs out from the machine.
That is a bug in my opinion. Node files should reside in a directory that is accessible to the user ant. If we fix this, running as root should just work.
I guess that should be done by the app and i am pretty sure app creates a user called ant specifically for nodes. I would debug it a bit more to know the following
even if we create a dedicated user for nodes, the node service is tied to the user session - meaning that when you logout, the service will be stopped
I run as root because that is an option and supported by the launchpad. Running as a normal user still requires me do additional work of making sure that the process doesn’t get terminated when i log out from the machine i.e. when i login(through ssh) and start a node, the node service is attached to the ssh session and gets terminated after sometime - this is what i observed so far
hmm, I am not aware of this. If so then it should be isolated from your normal user session.
No … Service/system users don’t have a session. Instead, a service manager like systemd directly launches the service’s process. The service runs as the specified user, but without a full login session.
Okay … I thought that was likely the case, as it would require to be installed with superuser privileges (sudo or root). So the team haven’t yet created the option to configure nodes as proper services … I expect they will get to that later down the track.
You could still create another normal user and then just lock the session, leaving it active - then you can just switch in and out of the session as you require. Not as as elegant, but doable now I suppose.