Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Securing /tmp and Mysql problems

Discussion in 'General Discussion' started by bmcpanel, Jun 25, 2004.

  1. bmcpanel

    bmcpanel Well-Known Member

    Joined:
    Jun 1, 2002
    Messages:
    546
    Likes Received:
    0
    Trophy Points:
    316
    I have a customer who is complaining about mysql problems after i used /scripts/securetmp to secure the /tmp directory on my Cpanel servers. Can someone elaborate on the issue brought up by the customer in the chat session transcript below. Have I caused a problem to our customers who use mysql when I ran /scripts/securetmp?

    Thanks

    ========================
    Support : Hi xxxxxx. How can I help you?
    Customer : MySQL cannot write to: /tmp/#sql_1b9b_0.MYI
    Customer : I looked at /tmp and only root has write privilege,
    Customer : I think maybe that particular file is locked, perhaps, also.
    Support : Yes. /tmp is sometimes used to compile break in programs by hackers. We have secured it.
    Customer : MySQL uses it for temporary tables.
    Support : Hmmm. I am not aware that this is an issue with typical mysql usage. I will have to investigate and get back to you on this one. Are you using PHP to create tables or databases or something of that nature?
    Customer : MySQL uses an environment variable TMPDIR that points to the particular directory. I am not creating tables. When a query runs, the MySQL program may create a temporary table for its own use. I do use PHP, but I also use other tools that failed as well.
    =====================================
     
  2. bmcpanel

    bmcpanel Well-Known Member

    Joined:
    Jun 1, 2002
    Messages:
    546
    Likes Received:
    0
    Trophy Points:
    316
    Thanks. No. /tmp shows 3% usage. Not full.
     
  3. dave9000

    dave9000 Well-Known Member

    Joined:
    Apr 7, 2003
    Messages:
    891
    Likes Received:
    1
    Trophy Points:
    168
    Location:
    arkansas
    cPanel Access Level:
    Root Administrator
    /tmp needs 0666 privledges it must be writtable by any process on the server not just writtable by root
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. SarcNBit

    SarcNBit Well-Known Member

    Joined:
    Oct 14, 2003
    Messages:
    1,010
    Likes Received:
    3
    Trophy Points:
    168
    Do you have a mysql.sock link in your /tmp directory?
     
  5. SarcNBit

    SarcNBit Well-Known Member

    Joined:
    Oct 14, 2003
    Messages:
    1,010
    Likes Received:
    3
    Trophy Points:
    168
    BTW it should point to /var/lib/mysql/mysql.sock
     
  6. bmcpanel

    bmcpanel Well-Known Member

    Joined:
    Jun 1, 2002
    Messages:
    546
    Likes Received:
    0
    Trophy Points:
    316
    Yes, there is a mysql.sock file in the /tmp

    lrwxrwxrwx 1 root root 25 Jun 20 03:16 mysql.sock -> /var/lib/mysql/mysql.sock=
    -rw------- 1 adifffi adisai 142 Jun 26 03:28 sess_3d6227cdd51978b6e6018c9654bf0f5f
    -rw------- 1 adifffi adisai 142 Jun 26 04:32 sess_ec234893bee6b57d2dcf3a93e9de2c09
     
  7. mickalo

    mickalo Well-Known Member

    Joined:
    Apr 16, 2002
    Messages:
    776
    Likes Received:
    4
    Trophy Points:
    318
    Location:
    N.W. Iowa
    If your having problems with the /tmp folder, change the setting in your my.cnf file, under the [mysqld] group, set your tmpdir:
    Code:
    tmpdir = /path/to_new/tmpfolder
    
    change it and see if that helps.

    Mickalo
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice