title: curl output file permission. How to set it while creating
body: <p>I am trying to generate static html files by scheduling curl command in cron which is accessing a url. like:</p>
  
  <pre><code>00 6 * * * /usr/bin/curl -m 14400 -o /opt/lampp/htdocs/reports/fragtab32595849.html http://xx.xx.xx.xx/fragtables.php?db=32595849
  </code></pre>
  
  <p>here /opt/lampp/htdocs/reports/fragtab32595849.html is the output file generated to an apache root directory. so that this static page is available for offline.</p>
  
  <p>I am doing this because <a href="http://xx.xx.xx.xx/fragtables.php" rel="nofollow">http://xx.xx.xx.xx/fragtables.php</a> code execution take almost half an hour to analyses all oracle tables.</p>
  
  <p>everything works fine except, the file generated is having permissions like</p>
  
  <pre><code>-rw-r-----  1 oracle oinstall 46357 Aug 15 06:13 fragtab32595849.html
  </code></pre>
  
  <p>since this file is not readable by everyone, Apache is not able to serve it.
  if i manually change the permission using chmod to: </p>
  
  <pre><code>-rw-r--r--
  </code></pre>
  
  <p>then apache start serving the page.
  I am looking for a solution how to instruct curl to generate file with desired permissions.</p>