{"action":"created","issue":{"url":"https://api.github.com/repos/hashicorp/nomad/issues/1916","repository_url":"https://api.github.com/repos/hashicorp/nomad","labels_url":"https://api.github.com/repos/hashicorp/nomad/issues/1916/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/nomad/issues/1916/comments","events_url":"https://api.github.com/repos/hashicorp/nomad/issues/1916/events","html_url":"https://github.com/hashicorp/nomad/issues/1916","id":186798435,"number":1916,"title":"exec driver: folder permissions in chroot env lack execute permissions","user":{"login":"bastiaanb","id":4092716,"avatar_url":"https://avatars.githubusercontent.com/u/4092716?v=3","gravatar_id":"","url":"https://api.github.com/users/bastiaanb","html_url":"https://github.com/bastiaanb","followers_url":"https://api.github.com/users/bastiaanb/followers","following_url":"https://api.github.com/users/bastiaanb/following{/other_user}","gists_url":"https://api.github.com/users/bastiaanb/gists{/gist_id}","starred_url":"https://api.github.com/users/bastiaanb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bastiaanb/subscriptions","organizations_url":"https://api.github.com/users/bastiaanb/orgs","repos_url":"https://api.github.com/users/bastiaanb/repos","events_url":"https://api.github.com/users/bastiaanb/events{/privacy}","received_events_url":"https://api.github.com/users/bastiaanb/received_events","type":"User","site_admin":false},"labels":[{"id":266756295,"url":"https://api.github.com/repos/hashicorp/nomad/labels/waiting-reply","name":"waiting-reply","color":"d4c5f9","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-02T13:19:50Z","updated_at":"2016-11-02T23:10:07Z","closed_at":null,"body":"### Nomad version\r\nNomad v0.4.1\r\nNomad v0.5.0-rc1 ('a8c8199e413d387021a15d7a1400c8b8372124d6+CHANGES')\r\n\r\n### Operating system and Environment details\r\nLinux. Tested on Fedora 24 and CoreOS Stable 1123\r\n\r\n### Issue\r\nIf the chroot_env configuration maps an individual file, the containing folder in the chroot environment lacks execute permissions. \r\n\r\n### Reproduction steps\r\n1. create nomad.conf containing:\r\n```\r\ndata_dir  = \"/var/lib/nomad\"\r\nlog_level = \"DEBUG\"\r\n\r\nclient {\r\n  chroot_env {\r\n    \"/etc/resolv.conf\" = \"/etc/resolv.conf\"\r\n  }\r\n}\r\n```\r\n2. Run Nomad agent ```nomad agent -dev -config=nomad.conf```\r\n3. Run an exec type job, e.g.  ```nomad run helloword.nomad```\r\n4. Inspect alloc folder ```nomad fs <alloc-id> helloworld```\r\n5. etc folder lacks execute permissions\r\n> Mode        Size     Modified Time          Name\r\n> drwxrwxrwx  4.0 KiB  11/02/16 14:04:18 CET  alloc/\r\n> drwxr-xr-x  4.2 KiB  11/02/16 08:46:32 CET  dev/\r\n> **drw-r--r--**  4.0 KiB  11/02/16 14:04:43 CET  etc/\r\n> ....\r\n\r\n### Nomad Server logs (if appropriate)\r\ndon't provide any details \r\n\r\n### Nomad Client logs (if appropriate)\r\ndon't provide any details \r\n\r\n### Job file (if appropriate)\r\nAny exec job will do. Helloword.nomad (0.4.1 version):\r\n```\r\njob \"helloworld\" {\r\n  datacenters = [\"dc1\"]\r\n  type = \"service\"\r\n\r\n  update {\r\n    stagger = \"5s\"\r\n    max_parallel = 1\r\n  }\r\n\r\n  group \"helloworld\" {\r\n    count = 1\r\n\r\n    task \"helloworld\" {\r\n      driver = \"exec\"\r\n      config {\r\n        command = \"helloworld\"\r\n      }\r\n\r\n      artifact {\r\n        source = \"https://storage.googleapis.com/global-datacenter-eu/helloworld/helloworld\"\r\n        options {\r\n          checksum = \"sha256:ee4751f7b17775e0d34514f0a00b9e92b39a8b859fc00d8e2f69e5aa6cceea4e\"\r\n        }\r\n      }\r\n\r\n      resources {\r\n        cpu = 100\r\n        disk = 200\r\n        memory = 64\r\n        network {\r\n          mbits = 1\r\n          port \"http\" {}\r\n        }\r\n      }\r\n\r\n      service {\r\n        name = \"helloworld\"\r\n        tags = [\"urlprefix-helloworld.gce.nauts.io/\"]\r\n        port = \"http\"\r\n        check {\r\n          type = \"http\"\r\n          name = \"health\"\r\n          interval = \"15s\"\r\n          timeout = \"5s\"\r\n          path = \"/health\"\r\n        }\r\n      }\r\n    }\r\n  }\r\n}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/hashicorp/nomad/issues/comments/258027015","html_url":"https://github.com/hashicorp/nomad/issues/1916#issuecomment-258027015","issue_url":"https://api.github.com/repos/hashicorp/nomad/issues/1916","id":258027015,"user":{"login":"dadgar","id":1047914,"avatar_url":"https://avatars.githubusercontent.com/u/1047914?v=3","gravatar_id":"","url":"https://api.github.com/users/dadgar","html_url":"https://github.com/dadgar","followers_url":"https://api.github.com/users/dadgar/followers","following_url":"https://api.github.com/users/dadgar/following{/other_user}","gists_url":"https://api.github.com/users/dadgar/gists{/gist_id}","starred_url":"https://api.github.com/users/dadgar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dadgar/subscriptions","organizations_url":"https://api.github.com/users/dadgar/orgs","repos_url":"https://api.github.com/users/dadgar/repos","events_url":"https://api.github.com/users/dadgar/events{/privacy}","received_events_url":"https://api.github.com/users/dadgar/received_events","type":"User","site_admin":false},"created_at":"2016-11-02T23:10:07Z","updated_at":"2016-11-02T23:10:07Z","body":"Is the permission of the folder different in the chroot than on the host?"}}
{"actor":{"display_login":"dadgar"}}