-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
exec driver: folder permissions in chroot env lack execute permissions #1916
Comments
Hey we mount with the same permissions as the host. Further we attempt to make the binary specified executable if it is not. |
Ha Alex, the isssue is not with file itself, but the containing folder, /etc in this case. |
Is the permission of the folder different in the chroot than on the host? |
I have also seen this issue. I guess its due to this line https://github.com/hashicorp/nomad/blob/master/client/allocdir/alloc_dir.go#L317 os.MkdirAll is using permissions of particular file (/etc/resolve.conf) which are set for containing directories as well. So permissions on /etc/resolv.conf will also be used for containing dir 'etc' which leads to 'etc' having incorect permissions ( lacking execute ) |
@devendram Thanks for pointing that out. Will get this fixed soon |
I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues. |
Nomad version
Nomad v0.4.1
Nomad v0.5.0-rc1 ('a8c8199e413d387021a15d7a1400c8b8372124d6+CHANGES')
Operating system and Environment details
Linux. Tested on Fedora 24 and CoreOS Stable 1123
Issue
If the chroot_env configuration maps an individual file, the containing folder in the chroot environment lacks execute permissions.
Reproduction steps
nomad agent -dev -config=nomad.conf
nomad run helloword.nomad
nomad fs <alloc-id> helloworld
Nomad Server logs (if appropriate)
don't provide any details
Nomad Client logs (if appropriate)
don't provide any details
Job file (if appropriate)
Any exec job will do. Helloword.nomad (0.4.1 version):
The text was updated successfully, but these errors were encountered: