🔔 🔔 🔔 Duyuru: 24. Yılımıza özel indirimler sizleri bekliyor ! Kampanya Kodu : TDATA2024 | Detaylı bilgi için tıklayınız.

How to increase /tmp partition size


How to increase /tmp partition size


cPanel recommend that you use a separate partition for /tmp that is mounted with nosetuid. Nosetuid will force a process to run with the privileges of it’s executor. You may also wish to mount /tmp with noexec after installing cPanel.

How to increase /tmp partition in cpanel

1. Stop cpanel, apache, mysql services and other webserver service.

/etc/init.d/cpanel stop
/etc/init.d/mysql stop
/etc/init.d/httpd stop

2. Try to Umount /tmp and /var/tmp

umount -l /tmp
umount -l /var/tmp

3. Move /usr/tmpDSK file to another location (just in case you’ll need to mount it somewhere else to preserve data):

mv /usr/tmpDSK /usr/tmpDSK_back

4. Modify /scripts/securetmp to set tmpdsksize. For example 2G size

vi /scripts/securetmp

$tmpdsksize = 2048000

5. Run:

/scripts/securetmp

6. Once completed, restart all the service.

/etc/init.d/cpanel start
/etc/init.d/httpd start
/etc/init.d/mysql start

You can increse /tmp partition size directly without scripts.

Stop all the service.

# /etc/init.d/mysql stop

# cp -af /var/tmp /var/tmp.bak

# umount /var/tmp

# umount /tmp

# mv /usr/tmpDSK /usr/tmpDSK_bak

Increase /tmp partition size to 2G

# dd if=/dev/zero of=/usr/tmpDSK bs=1024 count=2097195

# mkfs /usr/tmpDSK

# tune2fs -j /usr/tmpDSK

# mount -t ext3 -o nosuid,noexec,loop /usr/tmpDSK /tmp

# mount -o bind,noexec,nosuid /tmp /var/tmp

# cp -a /var/tmp.bak/* /tmp/

# rm -rf /var/tmp.bak

# chmod 1777 /tmp

Start all the service.

Bu cevap yeterince yardımcı oldu mu?

Diğer Dökümanlar


  • cPanel security settings checklist

    You always use cpanel recommended Security Settings to avoid hacking and other suspicious activity. These  cPanel Server Hardening & Security tips will help prevent from hacking. cPanel...

  • cPanel security settings checklist

    You always use cpanel recommended Security Settings to avoid hacking and other suspicious activity. These  cPanel Server Hardening & Security tips will help prevent from hacking. cPanel...

  • sendmail Not running with correct effective GID

    Wed Sep 04 04:11:11 2014] [error] [client 11.44.33.22] sendmail: Not running with correct effective GID.  Is sendmail binary setgid mailtrap?, It may be the problem with your sendmail binary...

  • How to enable NAT behind the cpanel ?

    Most of webhosting providers currently used NAT service for their users. When you install cPanel & WHM, the installer will detect whether your server is on a NAT-configured network. If the...

  • Unable to allocate memory for pool

    Warning: Unknown: Unable to allocate memory for pool. in Unknown on line 0 APC or Alternative PHP Cache (APC) is a free and open opcode cache for PHP. APC allows for caching of opcode generated...