Unable to write to /tmp
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
-
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 -
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 -
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 -
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 -
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 -
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 -
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 -
Centos 6.8 64 bit Cpanel 11.62 build 17 0 -
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 -
And the fix was? 0 -
And the fix was?
Can you describe the specific issue you are facing? Thank you.0 -
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 -
Hi @XeonS, Do you happen to use Nginx on this system? Thank you. 0
Please sign in to leave a comment.
Comments
13 comments