ThePorgs / Exegol

Fully featured and community-driven hacking environment

Home Page:https://exegol.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Share workspace as a non-root user on the host

d3lb3 opened this issue · comments

As a daily Exegol user, I often find myself annoyed that the shared workspace is mounted as root on the host filesystem.
Most users probably don't use the root account on their host when working with files, making them chown Exegol-generated files every time they need to be used outside of the container.

I think it would be nice to add an option which let users have a non-root shared folder on their host.
One way to do that would be to change the UID/GUID of the user running inside Exegol, in order to match a host user's UID/GUID (they could be specified as an option in the launcher). This blog post came to the same outcome when trying to address the issue : https://vsupalov.com/docker-shared-permissions.

This would probably require the creation and use an other user in Exegol, as changing the UID/GUID of the root user (actually in use in the container) would most probably break stuff (not sure about this one as I am not a Unix expert).

If you think this change could be interesting for user, I can work on a pull request to convert the whole sources installation files that make use of Exegol root user and directory to a dedicated Exegol user that would have the same rights, but specified UID/GUID to make file sharing with the hosts easier.

Thank you for raising this issue. It is in fact a problem. In my opinion, it should be implemented wrapper-wise first and then implemented in the images. Transferring this issue to the wrapper repo

Hello,

Thank you for your feedback,

Indeed this problem is one of the areas of improvement of Exegol ( through many other topics) but it is not currently planned to change the UID of the root user in the context exegol for various reasons.

This does not mean that I do not have other ideas to correct the problem and this issue will be addressed in future versions.

Just to add some precision on @Dramelac's answer. This issue will be addressed soon, it's in the priority list and is in active brainstorming.

I pushed in dev branch a first implementation of the permission sharing between exegol and the host.
It needs some testing before closing this issues and the latest nightly image (or execute the command umask 007 on every shell).