You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Inside the buildChroot method, there are some file copy and directory creation operations,
which are not considering file/dir ownership, only file/dir permissions.
Reproduction steps
Create file /etc/foo/bar.txt, with perms 0400, owned by user/group bob:bob
mkdir /etc/bar, with perms 0550, owned by bob:bob
Create and run any simple job using the 'exec' driver (so that buildChroot is called)
3a. (When data_dir is on a separate filesystem from /): Inspect copied filesystem in alloc dir.
See that /etc/foo/bar.txt has perms 0400 but is owned by root:root (expected bob:bob).
See that /etc/bar has perms 0550 but is owned by root:root (expected bob:bob)
3b. (When data_dir is on same filesystem as /): Inspect hardlinked filesystem in alloc dir.
Remember that dirs cannot be hardlinked, nomad has to create them.
See that /etc/bar has perms 0550 but is owned by root:root (expected bob:bob)
It would be nice to preserve owner:group on these items. Thanks!
The text was updated successfully, but these errors were encountered:
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.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Nomad version
Nomad v0.5.5
Operating system and Environment details
Ubuntu 16.04 on AWS us-east-1 c3.xlarge
Issue
Inside the buildChroot method, there are some file copy and directory creation operations,
which are not considering file/dir ownership, only file/dir permissions.
Reproduction steps
3a. (When
data_dir
is on a separate filesystem from /): Inspect copied filesystem in alloc dir.See that /etc/foo/bar.txt has perms 0400 but is owned by root:root (expected bob:bob).
See that /etc/bar has perms 0550 but is owned by root:root (expected bob:bob)
3b. (When
data_dir
is on same filesystem as /): Inspect hardlinked filesystem in alloc dir.Remember that dirs cannot be hardlinked, nomad has to create them.
See that /etc/bar has perms 0550 but is owned by root:root (expected bob:bob)
It would be nice to preserve owner:group on these items. Thanks!
The text was updated successfully, but these errors were encountered: