-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Meta: Build filesystem without root privileges #6570
Comments
well there is the genext2fs -or whatever- way, but it apperently does not do the setuid (etc.) stuff and with that neither your sync-local.sh works and you can't use su... |
We're already using genext2fs which requires root privileges to set root ownership and the set-uid bit, hence the requirement for |
Just from curiosity, isn't |
We could also entirely remove the need of loopback mounting, by using |
For Mac users: The version of genext2fs in homebrew was very old and didn't support the command line flags used in the Serenity build script. I just updated this to the latest version: Homebrew/homebrew-core#76862 It's much less hassle than dealing with fuse. Also, I tried using |
On Debian 10 I am able to build the SerenityOS image with a combination of Not sure about other operating systems and whether this should be the default/whether it should be configurable. |
Any chance to see kissen/serenity@bbb31f9 merged? Works out of the box for me. |
There has been some discussion (#5644) on working around the requirement for root privileges (which requires entering a password for
sudo
) every time we build the filesystem.Currently root privileges are required due to various privileged operations inside
build-root-filesystem.sh
, such as setting a file as root-owned or set-uid root. For example:serenity/Meta/build-root-filesystem.sh
Lines 47 to 67 in 31364da
This isn't ideal. Constantly prompting for credentials is annoying. And repetitively performing privileged operations (such as chown and chmod set-uid root) on user-owned files doesn't sit well with me either.
If someone is interested in resolving the situation properly, the requirement for
sudo
could be removed by instead building the filesystem inside a user namespace where fake "root" privileges can be granted (unshare -r
).This is significantly more secure than using
sudo
as no privileged operations are ever performed. Real root privileges are never granted or required.The obvious disadvantage to this approach is that the underlying operating system must support user namespaces. As such, any implementation should also support falling back to using
sudo
if namespaces aren't available.The text was updated successfully, but these errors were encountered: