Note that there are some explanatory texts on larger screens.

plurals
  1. POElastic Beanstalk cron and deployment permissions
    primarykey
    data
    text
    <p>During deployment to AWS Elastic Beanstalk I want to do two things:</p> <ol> <li>Take a file with cron entries and place this file in /etc/cron.d/</li> <li>Change the file permissions on shell scripts contained in a single directory so they can be executed by the cron</li> </ol> <p>In my .ebextensions folder I have the following:</p> <pre><code>container_commands: 00fix_script_permissions: command: "chmod u+x /var/app/current/scripts/*" 01setup_cron: command: "cat .ebextensions/propel_mis_crons.txt &gt; /etc/cron.d/propel_mis_crons &amp;&amp; chmod 644 /etc/cron.d/propel_mis_crons" leader_only: true </code></pre> <p>And the propel_mis_crons.txt in the .ebextensions folder has:</p> <pre><code># m h dom mon dow command MAILTO="dev@23sparks.com" * * * * * root /var/app/current/scripts/current_time.sh </code></pre> <p>I've checked the deploy logs and I can see the following:</p> <pre><code>2013-08-09 14:27:13,633 [DEBUG] Running command 00fix_permissions_dirs 2013-08-09 14:27:13,633 [DEBUG] Generating defaults for command 00fix_permissions_dirs &lt;&lt;&lt; 2013-08-09 14:27:13,736 [DEBUG] No test for command 00fix_permissions_dirs 2013-08-09 14:27:13,752 [INFO] Command 00fix_permissions_dirs succeeded 2013-08-09 14:27:13,753 [DEBUG] Command 00fix_permissions_dirs output: 2013-08-09 14:27:13,753 [DEBUG] Running command 01setup_cron 2013-08-09 14:27:13,753 [DEBUG] Generating defaults for command 01setup_cron &lt;&lt;&lt; 2013-08-09 14:27:13,829 [DEBUG] Running test for command 01setup_cron 2013-08-09 14:27:13,846 [DEBUG] Test command output: 2013-08-09 14:27:13,847 [DEBUG] Test for command 01setup_cron passed 2013-08-09 14:27:13,871 [INFO] Command 01setup_cron succeeded 2013-08-09 14:27:13,872 [DEBUG] Command 01setup_cron output: </code></pre> <p>However on deployment the permissions on all files in the scripts directory are not set correctly and the cron does not run. I'm not sure if the cron not running isn't running because of the permissions issue or if there is something else preventing this. This is running on a PHP5.4 64-bit Amazon Linux instance.</p> <p>Would appreciate some assistance on this. It's quite possible that over time new shell scripts to be triggered by a cron will be added.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload