{"action":"created","issue":{"url":"https://api.github.com/repos/coreos/bugs/issues/803","labels_url":"https://api.github.com/repos/coreos/bugs/issues/803/labels{/name}","comments_url":"https://api.github.com/repos/coreos/bugs/issues/803/comments","events_url":"https://api.github.com/repos/coreos/bugs/issues/803/events","html_url":"https://github.com/coreos/bugs/issues/803","id":108040919,"number":803,"title":"Failed to apply cloud-config: Unable to parse file permissions \"484\" as integer on Vagrant","user":{"login":"crawford","id":368848,"avatar_url":"https://avatars.githubusercontent.com/u/368848?v=3","gravatar_id":"","url":"https://api.github.com/users/crawford","html_url":"https://github.com/crawford","followers_url":"https://api.github.com/users/crawford/followers","following_url":"https://api.github.com/users/crawford/following{/other_user}","gists_url":"https://api.github.com/users/crawford/gists{/gist_id}","starred_url":"https://api.github.com/users/crawford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crawford/subscriptions","organizations_url":"https://api.github.com/users/crawford/orgs","repos_url":"https://api.github.com/users/crawford/repos","events_url":"https://api.github.com/users/crawford/events{/privacy}","received_events_url":"https://api.github.com/users/crawford/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-24T01:50:50Z","updated_at":"2015-09-24T01:50:52Z","closed_at":"2015-09-24T01:50:50Z","body":"<a href=\"https://github.com/tleyden\"><img src=\"https://avatars.githubusercontent.com/u/296876?v=3\" align=\"left\" width=\"96\" height=\"96\" hspace=\"10\"></img></a> **Issue by [tleyden](https://github.com/tleyden)**\n_Thursday Mar 26, 2015 at 18:20 GMT_\n_Originally opened as https://github.com/coreos/coreos-cloudinit/issues/328_\n\n----\n\nTo reproduce:\r\n\r\n```\r\n$ git clone git@github.com:tleyden/coreos-vagrant.git\r\n$ cd coreos-vagrant\r\n$ cp config.rb.sample config.rb\r\n$ cp user-data.sample user-data\r\n$ vagrant up && vagrant ssh core-01 -- -A\r\n```\r\n\r\nThis clones my fork which has some customization of the user-data file, in particular [adding a few files](https://github.com/tleyden/coreos-vagrant/blob/master/user-data.sample#L4-L54) via the write-files directive. \r\n\r\nAfter ssh'ing in, I get errors when listing machines:\r\n\r\n```\r\ncore@core-01 ~ $ fleetctl list-machines\r\n2015/03/26 18:14:00 INFO client.go:291: Failed getting response from http://127.0.0.1:4001/: dial tcp 127.0.0.1:4001: connection refused\r\n2015/03/26 18:14:00 ERROR client.go:213: Unable to get result for {Get /_coreos.com/fleet/machines}, retrying in 100ms\r\n```\r\n\r\nLooking into the journalctl logs, I see the following error:\r\n\r\n```\r\nMar 26 18:12:38 core-01 coreos-cloudinit[859]: Failed to apply cloud-config: Unable to parse file permissions \"484\" as integer\r\nMar 26 18:12:38 core-01 systemd[1]: user-cloudinit@var-lib-coreos\\x2dvagrant-vagrantfile\\x2duser\\x2ddata.service: main process exited, code=exited, status=1/FAILURE\r\nMar 26 18:12:38 core-01 systemd[1]: Failed to start Load cloud-config from /var/lib/coreos-vagrant/vagrantfile-user-data.\r\n```\r\n\r\n[Full journalct logs](https://gist.github.com/tleyden/84296d7a90b517ae4efa)\r\n\r\nI notice that something has changed the values in the user-data file:\r\n\r\n```\r\n$ diff user-data user-data.sample\r\n7c7\r\n<   permissions: 420\r\n---\r\n>   permissions: 0644\r\n13c13\r\n<   permissions: 420\r\n---\r\n>   permissions: 0644\r\n19c19\r\n<   permissions: 420\r\n```\r\n\r\nThe following workaround seems to work for me:\r\n\r\n```\r\n$ sed -i '' 's/420/0644/' user-data\r\n$ sed -i '' 's/484/0744/' user-data\r\n$ vagrant reload --provision\r\n```\r\n\r\nAny idea why the user-data file is getting the file permissions mangled?\r\n\r\nVersion: 633.1.0 alpha\n"},"comment":{"url":"https://api.github.com/repos/coreos/bugs/issues/comments/142780802","html_url":"https://github.com/coreos/bugs/issues/803#issuecomment-142780802","issue_url":"https://api.github.com/repos/coreos/bugs/issues/803","id":142780802,"user":{"login":"crawford","id":368848,"avatar_url":"https://avatars.githubusercontent.com/u/368848?v=3","gravatar_id":"","url":"https://api.github.com/users/crawford","html_url":"https://github.com/crawford","followers_url":"https://api.github.com/users/crawford/followers","following_url":"https://api.github.com/users/crawford/following{/other_user}","gists_url":"https://api.github.com/users/crawford/gists{/gist_id}","starred_url":"https://api.github.com/users/crawford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crawford/subscriptions","organizations_url":"https://api.github.com/users/crawford/orgs","repos_url":"https://api.github.com/users/crawford/repos","events_url":"https://api.github.com/users/crawford/events{/privacy}","received_events_url":"https://api.github.com/users/crawford/received_events","type":"User","site_admin":false},"created_at":"2015-09-24T01:50:52Z","updated_at":"2015-09-24T01:50:52Z","body":"<a href=\"https://github.com/jmreicha\"><img src=\"https://avatars.githubusercontent.com/u/1039098?v=3\" align=\"left\" width=\"48\" height=\"48\" hspace=\"10\"></img></a> **Comment by [jmreicha](https://github.com/jmreicha)**\n_Wednesday Aug 12, 2015 at 04:05 GMT_\n\n----\n\nJust ran in to this issue, quoting the permissions seems to work, although it would be nice not to deal wth them.\n"}}