<p>I installed Calicotl in my Ubunt trough this command:</p>

<p><code>curl -O -L https://www.projectcalico.org/builds/calicoctl</code></p>

<p>But, when I have to try this command in the terminal</p>

<pre><code>calicoctl apply -f calico.yaml
</code></pre>

<p>I have this error</p>

<pre><code>bash: /usr/local/bin/calicoctl: Permission denied
</code></pre>

<p>So, how can I fix that? Thank you very much! I try to this that with sudo but, it does not work etiher</p>

Isaac Alejandro
<p>The issue (if it isn't obvious) is that the user you are running the command as does not have the permissions to execute it. As @CharlesDuffy noted in the comment's:</p>

<blockquote>
  <p>If it's just direct output from <code>curl -o</code>, there won't be any <code>x</code> bits at all, so I'd expect <code>rw-r--r--</code> or <code>rw-rw-r--</code>, depending on the active umask</p>
</blockquote>

<p>What do the permissions look like for the executable? You can find that by running:</p>

<p><code>ls -l /usr/local/bin/calicoctl</code></p>

<p>The results of the above command will output something similar to:</p>

<p><code>-rw-r--r-- 1 root root 1680446 Jul 16 11:56 /usr/local/bin/calicoctl</code></p>

<p>Where the <code>rw-r--r--</code> portion refers to the allowed permissions of the Owner, Group, and World/Global respectively in three letter chunks. <a href="https://help.ubuntu.com/community/FilePermissions" rel="nofollow noreferrer">You can read more about how permissions work here</a>.</p>

<p>I have a feeling you're results look similar to <code>rw-r--r--</code> which would mean no one has the ability to execute. It's common that all binary located in <code>/usr/local/bin</code> are owned by <code>root</code>, are in the <code>root</code> group, and have permissions set to either <code>rwxrwxrwx</code> (where everyone can Read/Write/Execute) or <code>rwxr-xr-x</code> (where the Owner can Read/Write/Execute but Group members and Global can only Read/Execute.)</p>

<p>To can try to adjust you're permissions to <code>rwxrwxr-x</code> with </p>

<p><code>sudo chmod 775 /usr/local/bin/calicoctl</code> </p>

<p>and see if that works. <a href="https://linux.die.net/man/1/chmod" rel="nofollow noreferrer"><code>chmod</code></a> is the tool used to change permissions. Again, see <a href="https://help.ubuntu.com/community/FilePermissions" rel="nofollow noreferrer">this link for more info on permissions in Ubuntu/GNU+Linux</a>.</p>

<p>For reference, here is a numeric breakdown of user permissions:</p>

<pre><code>7 - full (rwx)
6 - read and write (rw-)
5 - read and execute (r-x)
4 - read only (r--)
3 - write and execute (-wx)
2 - write only (-w-)
1 - execute only (--x)
0 - none (---) 
</code></pre>

<p><sup>You can also probably just run your initial command with <code>sudo</code> but that's not a solution, just a workaround</sup></p>
