chmod with wildcard inside symlink
<p>I'm setting up Tomcat on Centos according to <a href="https://www.digitalocean.com/community/tutorials/how-to-install-apache-tomcat-8-on-centos-7" rel="nofollow">https://www.digitalocean.com/community/tutorials/how-to-install-apache-tomcat-8-on-centos-7</a> , but with a twist: I put Tomcat in <code>/opt/apache-tomcat-8.5.6</code> and then set up a symbolic link:</p>

<pre><code>sudo ln -s /opt/apache-tomcat-8.5.6 /opt/tomcat
</code></pre>

<p>Now I change the group ownership of <code>/opt/tomcat</code> to <code>tomcat</code>:</p>

<pre><code>sudo chgrp -R tomcat /opt/tomcat/conf
</code></pre>

<p>Then I give the <code>tomcat</code> group write access to the configuration directory:</p>

<pre><code>sudo chmod g+rwx /opt/tomcat/conf
</code></pre>

<p>But here is the problem: I try to give the <code>tomcat</code> group read access to all the configuration files:</p>

<pre><code>sudo chmod g+r /opt/tomcat/conf/*
</code></pre>

<p>That gives me an error: <code>chmod: cannot access ‘/opt/tomcat/conf/*’: No such file or directory</code></p>

<p>What? Does <code>chmod</code> not accept wildcards? Or does it not look inside symbolic links? What's going on?</p>

<p>Note that I got around it by doing this:</p>

<pre><code>sudo chmod g+r -R /opt/tomcat/conf
</code></pre>

<p>Does that give me effectively the same thing? (I know that it additionally makes the directory readable by the group, but that seems inconsequential --- the group could already read the directory.) Why doesn't the wildcard version work?</p>