title: `chmod: missing operand` in bash xargs script
body: <p>I have a folder in centos 7 as below:  </p>
  
  <pre><code>[root@localhost www]# ls -all
  -rw-r--r--  1   apache websites     191 Apr 23  2018 robots.txt
  drwxrwx---  3 websites websites      38 May 14  2018 functions
  </code></pre>
  
  <p>I want to change this these folders and files permissions to:  </p>
  
  <pre><code>[root@localhost www]# ls -all
  -r--------  1   apache apache     191 Apr 23  2018 robots.txt
  drx-------  3   apache apache      38 May 14  2018 functions
  </code></pre>
  
  <p>I tried bash script as below: </p>
  
  <pre><code>find . -group websites -type f -print0 | tee &gt;(xargs -0 chgrp apache) | xargs -0 chown apache | xargs -0 chmod 400
  find . -group websites -type d -print0 | tee &gt;(xargs -0 chgrp apache) | xargs -0 chown apache | xargs -0 chmod 500
  </code></pre>
  
  <p>But I get error :  </p>
  
  <pre><code>chmod: missing operand after ‘400’
  Try 'chmod --help' for more information.
  chmod: missing operand after ‘500’
  Try 'chmod --help' for more information.
  </code></pre>
  
  <p>What's the problem?
  Thanks in advance!</p>