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

/var/lib/rancher/k3s/storage selinux context wrong, can't create a local volume #1821

Closed
maci0 opened this issue May 23, 2020 · 3 comments
Closed

Comments

@maci0
Copy link

maci0 commented May 23, 2020

/var/lib/rancher/k3s/storage is set to system_u:object_r:container_var_lib_t:s0 by default

This prevents the local volume provisioning from working.

type should be container_file_t. applying this type with chcon fixes the issue

@tonsV2
Copy link

tonsV2 commented Sep 29, 2020

My attempt at translating @maci0's comment into a command is the below but it doesn't work. Can anyone tell me why?

sudo chcon system_u:object_r:container_file_t:s0 /var/lib/rancher/k3s/storage

@brandond
Copy link
Member

Can you share the error you're receiving?

@tonsV2
Copy link

tonsV2 commented Sep 30, 2020

@brandond - It actually does seem to work, my bad, thanks for your swift response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants