title: How do I add Linux capabilities SYS_NICE and DAC_READ_SEARCH to container in AWS Fargate?
body: <p>I'm trying to setup a task definition in ECS Fargate for running Koha containers but Fargate won't accept</p>
  <p><code>--cap-add=SYS_NICE --cap-add=DAC_READ_SEARCH</code></p>
  <p>(or any other kernel capabilities except for <code>SYS_PTRACE</code>) in the<a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html" rel="nofollow noreferrer"> task definition json file</a>. I tried adding  <code>&quot;linuxParameters&quot;: {&quot;capabilities&quot;: {  &quot;add&quot;: [   &quot;SYS_NICE&quot;, &quot;DAC_READ_SEARCH&quot;],</code>to the task definition json file but Fargate simply deletes the code.
  The mpm_itk module fails without this option (and my container throws an 500 error with the following warning/error in the logs</p>
  <p><code>[mpm_itk:warn] [pid 17146] (itkmpm: pid=17146 uid=33, gid=33) itk_post_perdir_config(): setgid(1000): Operation not permitted</code></p>
  <p>How do I work around this? Is there a way to pass on these capabilities after the container has started up? Any help will be appreciated, thanks!</p>