Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Member bmcpanel's Avatar
    Join Date
    Jun 2002
    Posts
    546

    Default Securing /tmp and Mysql problems

    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. #2
    Member bmcpanel's Avatar
    Join Date
    Jun 2002
    Posts
    546

    Default

    Originally posted by thaphantom
    most likely /tmp is full check that
    Thanks. No. /tmp shows 3% usage. Not full.

  3. #3
    Member dave9000's Avatar
    Join Date
    Apr 2003
    Location
    arkansas
    Posts
    891
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    /tmp needs 0666 privledges it must be writtable by any process on the server not just writtable by root

  4. #4
    Member
    Join Date
    Oct 2003
    Posts
    1,020

    Default

    Do you have a mysql.sock link in your /tmp directory?

  5. #5
    Member
    Join Date
    Oct 2003
    Posts
    1,020

    Default

    BTW it should point to /var/lib/mysql/mysql.sock

  6. #6
    Member bmcpanel's Avatar
    Join Date
    Jun 2002
    Posts
    546

    Default

    Originally posted by SarcNBit
    Do you have a mysql.sock link in your /tmp directory?
    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. #7
    Member mickalo's Avatar
    Join Date
    Apr 2002
    Location
    N.W. Iowa
    Posts
    753

    Default

    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

    Thunder Rain Internet Publishing

    Providing Internet Solutions that work!
    Custom Perl and Database Programming

Similar Threads & Tags
Similar threads

  1. securing /tmp directory ?
    By iv81 in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 01-24-2008, 04:40 PM
  2. mysql failed - i change size of /tmp /var/tmp use this command
    By dlthhost in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 05-13-2007, 03:39 AM
  3. mysql and tmp dir problems
    By Datcrack in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 01-05-2007, 02:02 AM
  4. Securing /tmp directory --Does it work?
    By bmcpanel in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 02-04-2004, 12:41 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube