Not able to create a directory using sudo -u username mkdir /var/log/test
<p>I am unable to create a directory using <code>sudo</code> priveleges from root user and If I login to user , I can create an directory under /root using <code>sudo</code>. Also I have added to allow all commands in <code>/etc/sudoers</code> file and the details are below:</p>
<pre><code>[root@linux home]# cat /etc/sudoers | grep  tes
test  ALL= NOPASSWD: ALL
</code></pre>
<h1><strong>Error</strong></h1>
<blockquote>
<p>[root@linux home]# sudo -u test mkdir /var/log/test3</p>
<p>mkdir: cannot create directory ‘/var/log/test3’: Permission denied</p>
</blockquote>
<p>Any Ideas ?</p>
<p>Thanks</p>