The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Unable to write to /tmp

Discussion in 'General Discussion' started by epaslv, Feb 23, 2017.

Tags:
  1. epaslv

    epaslv Member

    Joined:
    May 18, 2010
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    51
    Something strange hwe just noticed with all our servers running WordPress. All the updates fail with

    Update Failed: The package could not be installed. PCLZIP_ERR_MISSING_FILE (-4) : Missing archive file '/tmp/akismet.3.3-lYll1n.tmp'

    It appears that PHP is unable to write to /tmp which

    I have created another folder and have changed the global sys_temp_dir which resolves the problem. Is there any reason why the default, /tmp would not work?

    We are using the ea-php70 profile with PHP-FPM as per

    We are running CENTOS 7.3 x86_64 kvm – phil WHM 62.0 (build 15) with the following in EA4

    Apache 2.4
    config
    config-runtime
    mod_bwlimited
    mod_cgi
    mod_deflate
    mod_expires
    mod_headers
    mod_mpm_prefork
    mod_proxy
    mod_proxy_fcgi
    mod_proxy_http
    mod_ruid2
    mod_security2
    mod_ssl
    mod_unique_id
    tools

    PHP 7.0
    libc-client
    pear
    php-bcmath
    php-bz2
    php-calendar
    php-cli
    php-common
    php-curl
    php-devel
    php-fpm
    php-ftp
    php-gd
    php-iconv
    php-imap
    php-litespeed
    php-mbstring
    php-mcrypt
    php-mysqlnd
    php-pdo
    php-posix
    php-soap
    php-sockets
    php-xml
    php-zip
    runtime

    Others
    apr
    apr-util
    cpanel-tools
    documentroot
    libmcrypt
    modsec-sdbm-util
    php-cli
    php-cli-lsphp
    profiles-cpanel

    Below are the settings for /tmp

    drwxrwxrwt 10 root root 425984 Feb 24 13:41 tmp
    drwxrwxrwt 10 root root 4096 Feb 24 13:42 tmp

    /dev/vda1 61795324 11213140 48046060 19% /
    devtmpfs 4083476 0 4083476 0% /dev
    tmpfs 4088124 0 4088124 0% /dev/shm
    tmpfs 4088124 16808 4071316 1% /run
    tmpfs 4088124 0 4088124 0% /sys/fs/cgroup
    tmpfs 817628 0 817628 0% /run/user/0
    tmpfs 817628 0 817628 0% /run/user/99

    Running Kernels

    3.10.0-229.1.2.el7.x86_64
    3.10.0-514.6.2.el7.x86_64
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,288
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Please post the output from the following commands:

    Code:
    stat /tmp
    mount|grep tmp
    Also, while there are no changes in cPanel version 62, do note the following changes to the PHP session.save_path in cPanel version 64:

    Thank you.
     
  3. epaslv

    epaslv Member

    Joined:
    May 18, 2010
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    51
    Hi

    Thanks for looking into this. Stat for /tmp is as per below

    [root@bobby home]# stat /tmp
    File: '/tmp'
    Size: 425984 Blocks: 840 IO Block: 4096 directory
    Device: fd01h/64769d Inode: 393230 Links: 9
    Access: (1777/drwxrwxrwt) Uid: ( 0/ root) Gid: ( 0/ root)
    Access: 2017-02-28 03:19:38.263000000 +1100
    Modify: 2017-02-28 13:49:04.406000000 +1100
    Change: 2017-02-28 13:49:04.406000000 +1100
    Birth: -

    mount|grep tmp

    /dev/vda1 on /var/tmp type ext4 (rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user)

    The session.save_path is not set, or NULL, so I assume it defaults to /tmp

    I have set the sys_temp_dir globally to /var/tmp which resolves the issue, stat for /var/tmp/ is below

    [root@bobby public_html]# stat /var/tmp/
    File: '/var/tmp/'
    Size: 425984 Blocks: 840 IO Block: 4096 directory
    Device: fd01h/64769d Inode: 393230 Links: 9
    Access: (1777/drwxrwxrwt) Uid: ( 0/ root) Gid: ( 0/ root)
    Access: 2017-02-28 14:12:40.644000000 +1100
    Modify: 2017-02-28 14:16:53.248000000 +1100
    Change: 2017-02-28 14:16:53.248000000 +1100
    Birth: -



     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,288
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Could you open a support ticket using the link in my signature so we can take a closer look? You can post the ticket number here so we can update this thread with the outcome.

    Thank you.
     
  5. RWH Tech

    RWH Tech Well-Known Member

    Joined:
    Oct 1, 2015
    Messages:
    84
    Likes Received:
    16
    Trophy Points:
    8
    Location:
    Brazil
    cPanel Access Level:
    Root Administrator
    Hey guys, the same issue just cropped up here when I tried to update WP after the 64 upgrade. What's the fix?
    EDIT: Moving from FPM to CGI fixed it. Good thing I only have test sites on FPM.
     
    #5 RWH Tech, Apr 4, 2017
    Last edited: Apr 4, 2017
  6. epaslv

    epaslv Member

    Joined:
    May 18, 2010
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    51
    I am using FPM, the fix for me was to update php.ini to

    sys_temp_dir = "/var/tmp"

    But I am not sure if this is as secure
     
  7. vacancy

    vacancy Well-Known Member

    Joined:
    Sep 20, 2012
    Messages:
    122
    Likes Received:
    11
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    I have a similar problem.

    A shopping script is taking our products from another site with a bot in xml. The bot does not work when php-fpm is active, so I guess the same problem. The problem is solved when php-fpm is turned off and suphp is run.

    I am using php 5.6.
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,288
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Could you provide some more information about the affected systems? EX:

    Code:
    cat /usr/local/cpanel/version
    cat /etc/redhat-release
    Also, try running the following test PHP script on one of the websites using PHP-FPM to see if it loads:

    Code:
    <?php
    session_start();
    phpinfo();
    ?>
    If so, let us know what you see for the "session.save_path" value on the PHPINFO output.

    Thank you.
     
  9. vacancy

    vacancy Well-Known Member

    Joined:
    Sep 20, 2012
    Messages:
    122
    Likes Received:
    11
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Centos 6.8 64 bit
    Cpanel 11.62 build 17
     
  10. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,288
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Could you upload the test file referenced in my last response and let us know what you see for the "session.save_path" value in the PHPINFO output. I'm unable to reproduce this issue on a test system.

    Also, do you have any systems running cPanel version 64, and if so, can you reproduce the issue on those systems?

    Thank you.
     
Loading...

Share This Page