Mkdir() set permission 777
<p>How do I set permissions for folders below 777?</p>

<pre><code> mkdir(getcwd() . '/public/profile/usr'.$user-&gt;getId(), 0777, true);
 mkdir(getcwd() . '/public/profile/usr'.$user-&gt;getId() . '/patients', 0777, true);
 mkdir(getcwd() . '/public/profile/usr'.$user-&gt;getId() . '/picture', 0777, true);
</code></pre>

<p>Folder permissions for these are the type below:</p>

<pre><code>drwxr-xr-x
</code></pre>

<p>And I want it set to:</p>

<pre><code>drwxrwxrwx
</code></pre>

<p>Can you tell me please how to solve this problem?</p>