<p>I do the following...</p>
<pre><code>myUser@... nunya % git clone https://github.com/kubernetes/kubernetes
myUser@... nunya % cd kubernetes
myUser@... kubernetes % make
myUser@... cmd % cd cmd
myUser@... cmd % ./kubectl get namespaces
zsh: permission denied: ./kubectl
myUser@... cmd % sudo ./kubectl get namespaces
sudo: ./kubectl: command not found
</code></pre>
<p><code>ls -al</code> says it is owned by that user...</p>
<pre><code>drwxr-xr-x   4 myUser  staff   128 Jun 15 18:02 kubectl
</code></pre>
<p>So why am I getting the permission denied?</p>

Jackie
<p>As per the snippet you provided:</p>
<pre><code>drwxr-xr-x   4 myUser  staff   128 Jun 15 18:02 kubectl
</code></pre>
<p>This is a directory. Notice the first character of the permission is <code>d</code>. Perhaps you need to further <code>cd</code> to <code>kubectl</code> directory and try executing from there.  Here is an example where <code>foo</code> directory is created and supplied to <code>sudo</code> command.</p>
<pre><code>ps@ps-vm:~$ mkdir foo

ps@ps-vm:~$ ls -lrt |grep foo
drwxrwxr-x 2 ps ps     4096 Jun 15 18:37 foo
ps@ps-vm:~$

ps@ps-vm:~$ sudo ./foo
sudo: ./foo: command not found
ps@ps-vm:~$
</code></pre>
