List:General Discussion« Previous MessageNext Message »
From:Reindl Harald Date:January 19 2011 9:58pm
Subject:Re: Can't read dir of '.' (errno: 13)
View as plain text  
One simple querstion:

did you try "chown -R mysql:mysql /your/whole/data/dir"
if not do this and after that the problem is gone
or not - if it's gone all is ok, if not let us look
for other ideas

And yes it is possible tha mysql can authenticate the
user when bad permissions came after caching some
information and if your query nneeds access to non cached
data you have a problem

Am 19.01.2011 20:56, schrieb Joerg Bruehe:
> Hi !
> 
> 
> Jerry Schwartz wrote:
>>> -----Original Message-----
>>> From: Joerg Bruehe [mailto:joerg.bruehe@stripped]
>>> Sent: Wednesday, January 19, 2011 10:43 AM
>>> To: mysql@stripped
>>> Cc: Jerry Schwartz
>>> Subject: Re: Can't read dir of '.' (errno: 13)
>>>
>>> Hi!
>>>
>>>
>>> Jerry Schwartz wrote:
>>>>> -[[...]]
>>>>>
>>>> [JS] I have a related question: how can MySQL authenticate a user if
> file
>>>> system permissions won't let it read any databases?
>>> To me, your question sounds like you forgot the difference between
>>> server and client:
>>>
>> [JS] I don't think so, but perhaps I misunderstood the source of the error 
>> message.
>>
>> mysql> show databases ;
>> ERROR 1018 (HY000): Can't read dir of '.' (errno: 13)
>>
>> Are you saying that the mysql CLI needs to read some directory ('.', in this 
>> case) in order to send mysqld a simple query like SHOW DATABASES? I would hope 
>> it doesn't need a temporary file for that.
> 
> No, I didn't say that.
> 
> You say that "the mysql CLI ... send(s) mysqld a simple query ...", and
> that is correct: the client ("mysql") sends the command "show databases"
> to the server ("mysqld").
> To process this, the server has to check the file(s) and directory(ies)
> used to store the database contents, and one of those actions is to read
> the current directory.
> 
>>
>> Who is issuing the errno 13, the client or the daemon?
> 
> AIUI, it is the server, encountering a permission problem.
> So the server encounters a problem, and it reports this back to the
> client who will then output the message.
> 
> 
> Your question that triggered my original reply was:
>    how can MySQL authenticate a user if file system permissions
>    won't let it read any databases?
> 
> My original reply tried to make it obvious that the user (who is to be
> authenticated) is just a database concept, so this (maybe non-existing)
> user's (possibly missing) permissions in the operating system to read
> any OS object (file, directory) do not matter at all when the MySQL
> server does the authentication.
> It is the server (process) that needs the permissions to read (and
> write) database directories and files.
> 
> Of course, if these permissions are missing, then the server cannot
> operate (and so also cannot authenticate a user), but that is a question
> of server setup and not of database user privileges.
> 
> 
> HTH,
> Jörg
> 

-- 

Mit besten Grüßen, Reindl Harald
the lounge interactive design GmbH
A-1060 Vienna, Hofmühlgasse 17
CTO / software-development / cms-solutions
p: +43 (1) 595 3999 33, m: +43 (676) 40 221 40
icq: 154546673, http://www.thelounge.net/


Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
Thread
Can't read dir of '.' (errno: 13)Adarsh Sharma19 Jan
  • Re: Can't read dir of '.' (errno: 13)Adarsh Sharma19 Jan
  • Re: Can't read dir of '.' (errno: 13)Pintér Tibor19 Jan
    • Re: Can't read dir of '.' (errno: 13)Yogesh Kore19 Jan
  • RE: Can't read dir of '.' (errno: 13)Jerry Schwartz19 Jan
    • Re: Can't read dir of '.' (errno: 13)Joerg Bruehe19 Jan
      • RE: Can't read dir of '.' (errno: 13)Jerry Schwartz19 Jan
        • Re: Can't read dir of '.' (errno: 13)Joerg Bruehe19 Jan
          • RE: Can't read dir of '.' (errno: 13)Jerry Schwartz19 Jan
            • Re: Can't read dir of '.' (errno: 13)Joerg Bruehe20 Jan
              • RE: Can't read dir of '.' (errno: 13)Jerry Schwartz20 Jan
          • Re: Can't read dir of '.' (errno: 13)Reindl Harald19 Jan