Skip to main content

Unable to write to /tmp

Comments

13 comments

  • cPanelMichael
    Hello, Please post the output from the following commands:
    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 documentation.
    Thank you.
    0
  • epaslv
    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: -
    0
  • cPanelMichael
    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.
    0
  • RWH Tech
    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.
    0
  • epaslv
    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
    0
  • vacancy
    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.
    0
  • cPanelMichael
    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.

    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.

    Hello, Could you provide some more information about the affected systems? EX:
    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:

    If so, let us know what you see for the "session.save_path" value on the PHPINFO output. Thank you.
    0
  • vacancy
    Centos 6.8 64 bit Cpanel 11.62 build 17
    0
  • cPanelMichael
    Centos 6.8 64 bit Cpanel 11.62 build 17

    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.
    0
  • Domenico
    And the fix was?
    0
  • cPanelMichael
    And the fix was?

    Can you describe the specific issue you are facing? Thank you.
    0
  • XeonS
    The issue still persists on v68.0.19, a fix is to force rebuild the PHP-FPM conf with Migrate all accounts to PHP-FPM or edit php.ini for every PHP version and add upload_tmp_dir = /var/tmp which is not very safe. (be careful if you have open_basedir, you need to put :/var/tmp) The upload_tmp_dir should be /home/$user/tmp not the main /var/tmp, maybe guys from CPanel will think about this and look for more features on security, like disable_functions,open_basedir, session.savepath and upload_tmp_dir, all of these should be in every user folder, like a chroot environment.
    0
  • cPanelMichael
    Hi @XeonS, Do you happen to use Nginx on this system? Thank you.
    0

Please sign in to leave a comment.