Yes it is obvious if you read the documentation for readdir.
In reply to Re: permission error by jwkrahn in thread permission error by zzgulu