From: Joerg Bruehe Date: January 20 2011 11:53am Subject: Re: Can't read dir of '.' (errno: 13) List-Archive: http://lists.mysql.com/mysql/224125 Message-Id: <4D38223C.3020702@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Hi! Jerry Schwartz wrote: > [[...]] >=20 >> [[...]] >> > [JS] Sorry, that still doesn't make sense to em. To authenticate the us= er,=20 > mysqld needs to read the mysql database. That is also where the databas= es are=20 > listed (in `mysql`.`db`). If the daemon can read `mysql`.`user`, why ca= n't it=20 > read `mysql`.`db`? It's a MyISAM database, so everything is in the same= file. Now I understand how your question was meant - sorry to explain a completely different issue first. About reading files: MyISAM is stored file-per-table, so the table "mysql.user" is stored in the three files "mysql/user.{frm,MYD,MYI}"; table "mysql.db" is stored in other files which might have got different permissions. (This would be a handling error, obviously.) >=20 > What am I missing? Does SHOW DATABASES do something other than pull the= =20 > database names out of `mysql`.`db`? AIUI, there are operations for which the server wants to read the directory, and "show databases" seems to be one of them. For examples, see these bug reports: http://bugs.mysql.com/bug.php?id=3D22615 http://bugs.mysql.com/bug.php?id=3D42676 http://bugs.mysql.com/bug.php?id=3D51399 Sorry - I would tell you more details, if I knew them for sure. Now, consider a case like this: drwx--x--x user-A group-B . -rw-rw-rw- user-A group-B file In this case, "file" would be readable (and even writable) for everybody knowing the name, but a "ls ." would fail for everybody but "user-A": There is no "read" permission on the directory for anybody but the owner.= Regards, J=F6rg --=20 Joerg Bruehe, MySQL Build Team, joerg.bruehe@stripped ORACLE Deutschland B.V. & Co. KG, Komturstrasse 18a, D-12099 Berlin Geschaeftsfuehrer: Juergen Kunz, Marcel v.d. Molen, Alexander v.d. Ven Amtsgericht Muenchen: HRA 95603