[mythtv-users] Mythfilldatabase temporary tables do not exist (SOLVED)

R. G. Newbury newbury at mandamus.org
Sun Dec 9 00:03:07 UTC 2007


Michael T. Dean wrote:
> On 12/07/2007 08:14 PM, R. G. Newbury wrote:
>> Michael T. Dean wrote:
>>   
>>> On 12/07/2007 06:53 PM, R. G. Newbury wrote:
>>>     
>>>> Daniel Kristjansson wrote:
>>>>> On Wed, 2007-12-05 at 10:51 -0500, R. G. Newbury wrote:
>>>>>> At present, mysql creates temporary tables at (be default) /tmp.
>>>>>> /tmp is owned by root and mysql does not have permission to write.
>>>>> Every user should be able to write to tmp:
>>>>> drwxrwxrwt 12 root root 4096 2007-12-07 17:05 /tmp/
>>>>>
>>>>> That "t" at the end means that anyone can create a file in that
>>>>> directory and will retain ownership of the file.
>>>>>     
>>>>>         
>>>> Well that might provide an explanation of how things went pear-shaped. I 
>>>> don't remember what the perms were but when I went checking, they were 
>>>> NOT drwxrwxrwxt... Possibly I inadvertently borked that...which lead to 
>>>> all of the other (self-inflicted!) pain.  Dang, I hate it when that 
>>>> happens...
>>> That t would be the 1 in 1777 at
>>> http://www.gossamer-threads.com/lists/mythtv/users/300986#300986 .
>>>> ...
>>>> Interestingly, neither the laptop nor the desktop server have the sticky 
>>>> bit set. The fileserver does however.
>>>>       
>>> TTBOMK, that is broken according to the File system Hierarchy Standard
>>> (FHS).  The sticky bit prevents users from removing another user's files
>>> (only owner and superuser can remove the files), so MySQL relies on it
>>> for security of the Unix socket file (see the second link in my post above).
>>>     
>> Under Fedora, the mysql.sock socket is placed in the /var/lib/mysql 
>> folder and owned by mysql.
>>   
> 
> OK, but it seems that MySQL uses the same permissions requirement for
> security of temp tables (and probably much more), too.  It's quite
> possible that the manual talks about all the places where /tmp is used
> and requires the sticky bit to be set, but I didn't read it all to solve
> your issue...  Just figured pointing you to one location which said to
> use different permissions than you used would get you started down the
> path to finding all the details you wanted.  ;)
> 
>> The desktop is running Fedora 6...installed I don't know when. The 
>> server is Fedora8rc2 with the OS on a separate drive from the storage 
>> partition and I don't play with it at all. so it hasn't been corrupted.
> 
> Hmmm.  Guess the standard isn't that specific on the permissions.  That
> said, I would never trust putting a file into /tmp on a system whose
> /tmp does not have the sticky bit set.

My problem has long since been solved! First visible symptom was a 'file 
  does not exist' from mythfilldatabase. That symptom occurred because 
mysql could not *create* the file: bad permissions. I created a 
/tmp/mysql folder and gave it to mysql. I (properly) told mysql to use 
/tmp/mysql. Problem solved without actually having a sticky bit set but 
therefore relying on a 0700 permission mode to stop anything/anybody 
from deleting mysql's temp files. (And the sticky bit is now set.)

Geoff


More information about the mythtv-users mailing list