title: EC2 Bootstrap script not executed on Ubuntu
body: <p>I am trying to set bootstrap script for EC2 Ubuntu machine with below CLI commands:</p>
  
  <pre><code>#cloud-boothook
  #!/bin/bash
  sudo chmod 750 -R  /home/
  </code></pre>
  
  <p>Above text is set via AWS console in user data.</p>
  
  <p>Once machine has started running, change mode still not amended by above user data script.</p>
  
  <p>Tried alternative command as:</p>
  
  <pre><code>Content-Type: text/cloud-boothook
  Content-Type: text/x-shellscript
  sudo chmod 750 -R  /home/
  </code></pre>
  
  <p>Still directory permission is not changed.</p>
  
  <p>My objective is to set user home directory with <code>750</code> change mode on machine startup.</p>
  
  <p>I would appreciate any solution to this.</p>
  
  <p>Here is the error message appearing for me:</p>
  
  <pre><code>[[0;32m  OK  [0m] Started Initial cloud-init job (pre-networking).
  [[0;32m  OK  [0m] Reached target Network (Pre).
  [[0;32m  OK  [0m] Started ifup for eth0.
           Starting Raise network interfaces...
  [[0;32m  OK  [0m] Started Raise network interfaces.
  [[0;32m  OK  [0m] Reached target Network.
           Starting Initial cloud-init job (metadata service crawler)...
  [    7.535726] cloud-init[1003]: Cloud-init v. 0.7.9 running 'init' at Sun, 29 Oct 2017 19:44:35 +0000. Up 7.23 seconds.
  [    7.548260] cloud-init[1003]: ci-info: ++++++++++++++++++++++++++++++++++++++Net device info++++++++++++++++++++++++++++++++++++++
  [    7.565098] cloud-init[1003]: ci-info: +--------+------+-----------------------------+---------------+-------+-------------------+
  [    7.580238] cloud-init[1003]: ci-info: | Device |  Up  |           Address           |      Mask     | Scope |     Hw-Address    |
  [    7.592760] cloud-init[1003]: ci-info: +--------+------+-----------------------------+---------------+-------+-------------------+
  [    7.602150] cloud-init[1003]: ci-info: |   lo   | True |          127.0.0.1          |   255.0.0.0   |   .   |         .         |
  [    7.613465] cloud-init[1003]: ci-info: |   lo   | True |           ::1/128           |       .       |  host |         .         |
  [    7.625404] cloud-init[1003]: ci-info: |  eth0  | True |        172.31.19.221        | 255.255.240.0 |   .   | 06:ad:ba:ed:47:10 |
  [    7.635005] cloud-init[1003]: ci-info: |  eth0  | True | fe80::4ad:baff:feed:4710/64 |       .       |  link | 06:ad:ba:ed:47:10 |
  [    7.648580] cloud-init[1003]: ci-info: +--------+------+-----------------------------+---------------+-------+-------------------+
  [    7.663022] cloud-init[1003]: ci-info: +++++++++++++++++++++++++++++Route IPv4 info+++++++++++++++++++++++++++++
  [    7.674192] cloud-init[1003]: ci-info: +-------+-------------+-------------+---------------+-----------+-------+
  [    7.682430] cloud-init[1003]: ci-info: | Route | Destination |   Gateway   |    Genmask    | Interface | Flags |
  [    7.690935] cloud-init[1003]: ci-info: +-------+-------------+-------------+---------------+-----------+-------+
  [    7.703027] cloud-init[1003]: ci-info: |   0   |   0.0.0.0   | 172.31.16.1 |    0.0.0.0    |    eth0   |   UG  |
  [    7.712719] cloud-init[1003]: ci-info: |   1   | 172.31.16.0 |   0.0.0.0   | 255.255.240.0 |    eth0   |   U   |
  [    7.719950] cloud-init[1003]: ci-info: +-------+-------------+-------------+---------------+-----------+-------+
  **[    7.728024] cloud-init[1003]: 2017-10-29 19:44:35,859 - __init__.py[WARNING]: Unhandled non-multipart (text/x-not-multipart) userdata: 'b'Content-Type: text/cloud'...'**
  [[0;32m  OK  [0m] Started Initial cloud-init job (metadata service crawler).
  [[0;32m  OK  [0m] Reached target Cloud-config availability.
  [[0;32m  OK  [0m] Reached target System Initialization.
  [[0;32m  OK  [0m] Listening on D-Bus System Message Bus Socket.
           Starting Socket activation for snappy daemon.
  </code></pre>