Wednesday, February 17, 2016

How to Increase tmp partition size in cPanel

Stop cpanel, apache or litespeed, mysql services:

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

2. 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 to desired size:

vi /scripts/securetmp

 $tmpdsksize = 4096000

5. Run:

/scripts/securetmp

6. Start cpanel, apache (litespeed), mysql services:

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

Saturday, February 13, 2016

How to fix Cpanel Account Permission

find /home/*/public_html/* -type f -exec chmod 644 {} \;
find /home/*/public_html/* -type d -exec chmod 755 {} \;

Friday, February 5, 2016

Tuesday, February 2, 2016

How to remove default email account emails in cPanel

Run this script :
find /home/xxx/mail/cur -name "144*" -exec rm -fv {} \;

144 - is the Name of the File
xxx - cPanel Username

If the emails disk size is not update then please run this command :
/scripts/generate_maildirsize --confirm --allaccounts --verbose ahora