How to use cPanels /scripts/securetmp ?
Enable securetmp:
# /scripts/securetmp
If received an error "mount: Could not find any loop device. Maybe this kernel does not know about the loop device? (If so, recompile or `modprobe loop'.)"
if "modprobe loop" on host node fails with "FATAL: Module loop not found." error, note that on OpenVZ loop devices are not supported.
Disable securetmp:
cat /etc/rc.d/rc.local | grep sec;touch /var/cpanel/version/securetmp_disabled;cat /etc/rc.d/rc.local | grep sec
check /tmp dir:
# ls -lh /tmp | grep -v sess
Im using custom directory/mounted filesystem: "/tmp/mysqltmp"drwxrwxrwt 3 root root 4.1M Oct 4 13:38 ./
drwxr-xr-x 27 root root 4.0K Sep 28 14:14 ../
-rw------- 1 cpanel cpanel 0 Oct 3 20:00 .ftpquota
-rw-r--r-- 1 root root 2.3K Oct 4 06:35 lastcpanels
lrwxrwxrwx 1 root root 27 Oct 3 20:00 mysql.sock -> ../var/lib/mysql/mysql.sock=
drwx------ 2 mysql mysql 40 Oct 4 13:38 mysqltmp/
and mysql.sock is also there. So i will want to first stop mysql before doing anything with files.
Unmount filesystems:/etc/init.d/chkservd stop # stop service that monitoring services running
/etc/init.d/mysql stop # stop mysql service
/tmp is created and has proper permissions:umount /tmp
umount /var/tmp
umount /tmp/mysqltmp # im using this custom mysql tmpdir filesystem, you may not
mysql.sock symlink is not there? then create it:mkdir /tmp;chmod 1777 /tmp;chown root:root /tmp;ls -lh /tmp | grep -v sess
cd /tmp
ln -s /var/lib/mysql/mysql.sockStart services again:mount /tmp/mysqltmp # im using this custom mysql tmpdir filesystem, you may not
/etc/init.d/mysql start
/etc/init.d/chkservd start
Bookmarks