PHP chmod reports success when it has not worked - why?
<p>I have tried this:</p>

<pre><code>echo substr(sprintf('%o', fileperms($mdbFilename)), -4).'&lt;br /&gt;';
echo chmod($mdbFilename, 0777);
echo substr(sprintf('%o', fileperms($mdbFilename)), -4).'&lt;br /&gt;';
</code></pre>

<p>The out put I get for the above is:</p>

<pre><code>0666
1
0666
</code></pre>

<p>So the above has not worked! Why is this the case? And why does chmod report true?</p>

<p>The variable <code>$mdbFilename</code> contains the path to the file which is <code>C:\wamp\www\webs\db\access_db_1276264459.mdb</code></p>

<p>Any help will be appreciated.</p>
