-
Notifications
You must be signed in to change notification settings - Fork 71
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
kraft net
almost unusable with multiple users
#992
Comments
kraft net
unusable with multiple userskraft net
almost unusable with multiple users
@LucaSeri is it okay if I assign this issue to you? I know you bumped into this recently I'm not sure how a fix looks like, probably making kraftkit somehow ask for On a successful run, in my head:
This ensures that info is saved in the Same in the case of |
One more idea brainstorm resulted in this: I was thinking on this and I have a possible stop-gap fix #992 What if we:
^ With this we can add an Info message saying: We can do then we go and do Might be a bit more annoying for so it will require adding a: defer func(){
if user, group, ok := isSudoNotRoot(); ok {
os.Chown(file, user, group)
}
}() os.CreateAsUser(path, user string)
os.OpenAsUser(path, user string)
os.MkdirAsUser(path, user string)
os.mkdirAllAsUser(path, user string) there's also the nuclear option 3.: If root, create all files with extra permissions equal to user permissions |
Describe the bug
Trying to use the
kraft net
subcommands together withkraft run
is almost impossible when using multiple users.In order to create a network interface you need to use
sudo
, and then you should be able to use it insidekraft run
.But, to use it there, you also need to use
sudo
forkraft run
. This means that the user is changed and the path to the config also becomes changed (effectively using the home ofroot
).This can prove confusing as people ca run:
sudo kraft run
kraft ps
And then see no output, even though they should.
Steps to reproduce
No response
Expected behavior
No response
Which architectures were you using or does this bug affect?
x86_64, arm, arm64
Which operating system were you using or does this bug affect?
linux/debian, linux/fedora, linux/alpine, linux/arch, linux/other
Relevant log output
No response
The text was updated successfully, but these errors were encountered: