-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
"FATA [0000] permission denied" when /var is mounted noexec #7372
Comments
|
|
I suggest you strace the command and figure out what it's trying to do that is getting a permission denied error. There's not enough context here to figure out what it's doing. Is this maybe a selinux problem? |
I tried the newer version : v1.27.1+k3s1 , Now it throws me this error message : k3s-server executable file not found in $path. |
is something preventing it from extracting the binaries to brandond@seago:~$ ls -la /var/lib/rancher/k3s/data/current/bin/k3s*
-rwxr-xr-x 1 root root 136943800 Apr 19 12:36 /var/lib/rancher/k3s/data/current/bin/k3s
lrwxrwxrwx 1 root root 3 Apr 19 17:00 /var/lib/rancher/k3s/data/current/bin/k3s-agent -> k3s
lrwxrwxrwx 1 root root 3 Apr 19 17:00 /var/lib/rancher/k3s/data/current/bin/k3s-certificate -> k3s
lrwxrwxrwx 1 root root 3 Apr 19 17:00 /var/lib/rancher/k3s/data/current/bin/k3s-completion -> k3s
lrwxrwxrwx 1 root root 3 Apr 19 17:00 /var/lib/rancher/k3s/data/current/bin/k3s-etcd-snapshot -> k3s
lrwxrwxrwx 1 root root 3 Apr 19 17:00 /var/lib/rancher/k3s/data/current/bin/k3s-secrets-encrypt -> k3s
lrwxrwxrwx 1 root root 3 Apr 19 17:00 /var/lib/rancher/k3s/data/current/bin/k3s-server -> k3s
lrwxrwxrwx 1 root root 3 Apr 19 17:00 /var/lib/rancher/k3s/data/current/bin/k3s-token -> k3s You can try deleting
Did you previously have it enabled? Have you installed the k3s-selinux package? |
Yes , /var is mounted as noexec . And this is the strace output for the k3s v1.26.4+k3s1
yes , selinux was enabled at the start and disabled it later , then reinstalled the k3s . |
Yep.
This is probably the easiest thing to do. I'm not sure which distros are now coming with /var noexec by default, but k3s will not work with this when using the default data-dir.
If you do this, set it in the config.yaml so that you don't have to remember to pass it on the command-line all the time. |
Opened a PR to improve the error message. |
Thanks man , I'll check this configuration. |
Reopening to track error message improvement PR. |
It's not a distro default, but rather a condition of the "CIS Red Hat Enterprise Linux 8 Benchmark" system hardening policy, which is not an uncommon policy in environments with regulatory or policy constraints; "k3s will not work with this when using the default data-dir", in combination with "Using a custom --data-dir under SELinux is not supported." (from [https://docs.k3s.io/advanced#enabling-selinux-enforcement]) creates a Catch-22 situation for running k3s on SCAP-hardened systems, it seems, as enforcing selinux is also a condition in the aforementioned benchmark; |
Validated on branch with commit / version
Environment DetailsInfrastructure
Node(s) CPU architecture, OS, and Version:
Cluster Configuration:
Config.yaml:
Testing Steps
reboot the VM
Validation Results:
|
Environmental Info:
K3s Version: v1.26.0+k3s1
Node(s) CPU architecture, OS, and Version:
Linux hostgamma 4.18.0-425.13.1.el8_7.x86_64 #1 SMP Thu Feb 2 13:01:45 EST 2023 x86_64 x86_64 x86_64 GNU/Linux
Cluster Configuration:
2 servers 2 agents
I'm trying to run k3s on redhat 8 server and i see this FATA [0000] permission denied whenever i try to run
k3s server
But k3s command works and shows the help window.
Steps To Reproduce:
prefer-bundled-bin: true
k3s_use_unsupported_config: true
Expected behavior:
Run k3s server
Actual behavior:
Throws FATA [0000] permission denied
Additional context / logs:
I can't get any logs other than this
The text was updated successfully, but these errors were encountered: