Skip to content
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

Docs: Add Ubuntu 24.04 fix instructions #3721

Merged
merged 2 commits into from
Dec 17, 2024
Merged

Conversation

ocdtrekkie
Copy link
Collaborator

We've had a bunch of people have weird reports of issues with Ubuntu 24.04, and so far this has been the solution to all of them. I think we should codify it in the documentation page.

@Michael-S found this solution, and deserves all the credit.

@ocdtrekkie
Copy link
Collaborator Author

@orblivion Can you review this PR?

user namespaces. You can run the following commands to correct this:

```bash
sudo echo "kernel.apparmor_restrict_unprivileged_userns = 0" > /etc/sysctl.d/99-userns.conf
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you actually run this successfully? I think the sudo powers wear off when you hit the > token:

sudo echo "test" > /etc/test-test-test
bash: /etc/test-test-test: Permission denied

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also how comfortable are you with 99-userns being unique enough? That line (once permissions are fixed) would overwrite anything the user might have had there if they happened to have the same filename.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can do some testing with our VPS demo. Maybe we should change it to sandstorm-userns.conf or something so it's extremely unique?

@orblivion
Copy link
Contributor

Maybe wouldn't hurt to link to that security implications page from this solution.

@orblivion
Copy link
Contributor

orblivion commented Nov 21, 2024 via email

@ocdtrekkie
Copy link
Collaborator Author

I am sure you are right, but clearly I should go do this on an Ubuntu 24.04 system and make sure I end up with working instructions before I update this PR. =) The other troubleshooting steps on the page didn't assume we already had root, so I figure we should not assume that as well.

@ocdtrekkie
Copy link
Collaborator Author

So... my test box I cannot not be root. :|

Research tells me sudo sh -c 'echo "kernel.apparmor_restrict_unprivileged_userns = 0" > /etc/sysctl.d/sandstorm-userns.conf' should work?

@orblivion Can you confirm that?

@orblivion
Copy link
Contributor

The command works, though don't forget the 99 (I don't know what it's there for but they all seem to have numbers)

@ocdtrekkie
Copy link
Collaborator Author

I read that it could be anything ending with .conf, and I did test with this filename on Ubuntu 24.04. I do not know why they start with numbers traditionally either.

@ocdtrekkie
Copy link
Collaborator Author

Does this updated note suffice for mergeability?

Apparently the number scheme it's just a convenience for ordering: https://unix.stackexchange.com/questions/570770/what-does-the-number-in-sysctl-configuration-file-denote

But in the case of using "99-" it serves the same purpose as just naming the file starting with "sandstorm-"... it's processed last alphabetically. IMHO, I'd rather be fully descriptive in the filename, i.e. sandstorm-userns over 99-sandstorm or 99-userns which is less clear what it's for or what it does.

@orblivion
Copy link
Contributor

orblivion commented Dec 16, 2024 via email

@ocdtrekkie ocdtrekkie merged commit 73a5e98 into master Dec 17, 2024
2 of 4 checks passed
@ocdtrekkie ocdtrekkie deleted the ubuntu2404-fix-docs branch December 17, 2024 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation issues ready-for-review We think this is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants