cPanel: Group ownership become ID?

Today I found that one account having weird error.

Error:
1) The group ownership became an ID and the site is unable to load as in valid group.
2) Where try chown the folder, it will return “invalid user” error

Solution:

1) check if the group ownership is correct, it wrong as below, please continue step (2)

2) open /etc/group and add in USER:x:GROUP:

For the screen shot case, add it as ipless:x:512:

3) /etc/gshadow and add in USER:!::

For the screen shot case, add it as ipless:!::

Done and the group permission will correct automatically.

Ruby: Unable to Create Ruby on Rails Application at cPanel

When you receive the error as below when try to create Ruby on Rails application on cPanel. It mean that your rails/ruby version installed is not supported by cPanel.

Your app is NOT installed because there was a problem. Try again or contact
our support team.

So the solution will be remove the current Ruby and Rails and install it by cPanel build in script. Moving the unsupported Ruby and Rails environment and then reinstalling using the proper cPanel script should setup the machine with the right Rails version and mongrel.

(1) Remove the unsupported Ruby and Rails

mv /usr/bin/ruby /usr/bin/ruby.bak
mv /usr/lib/ruby /usr/lib/ruby.bak
mv /usr/bin/gem /usr/bin/gem.bak
mv /usr/bin/rails /usr/bin/rails.bak

(2) Install again by cPanel script

/scripts/installruby --force

Increase the size of /tmp

Once the process of the server increase, /tmp drive space may not able to cater your server need. So if you are using the cPanel, there is a script for you to increase it. Below is the step.

(1) Open /scripts/securetmp and edit the link as below

my $tmpdsksize = 512000;

Note: This is increase to 512MB

(2) stop cpanel, httpd, mysql service first as we do not have new session file go there when we increase the size.

service httpd stop
service mysql stop
service cpanel stop

(3) Take a copy of all the session file in /tmp

cp -apr /tmp /tmp_bak

(4) Check what processes are still writing to /tmp and kill it

lsof |grep /tmp

(5) Unmount /tmp

umount /tmp

(6) Run the script that you edit in step 1

/scripts/securetmp

(7) Verify it have done

df -h

(8) Copy back the session file

cp -apr /tmp_bak/* /tmp/

(9) Start back all service

service mysql start
service cpanel start
service httpd start

Done, bingo!

restart service predefined scripts (cPanel)

There is some restart service predefined scripts come with cPanel with is MUST KNOW by all the server admin.

How to use it? Just log into SSH and use the command /script/restartsrv_ follow by the bold word as below.

Web Service:
apache — Apache web server.
httpd — Apache web server.
tomcat — Apache Tomcat service

DNS Service:
bind — BIND nameserver software.
named — BIND nameserver software.

Email Service:
cppop— cPanel’s POP server.
imap — IMAP server.
dovecot — Dovecot mail server.
courier— Courier mail server.
exim — Exim mail exchanger.
eximstats — Exim mail statistics tracker.
spamd — Spam-deferral daemon.

Cpanel Service:
chkservd — cPanel’s TailWatch log processing service.
clamd — ClamAV anti-virus software.
cpdavd — cPanel’s WebDAV server.
tailwatchd — cPanel’s TailWatch log processing service.
sshd — Secure shell daemon.

FTP Service:
ftpserver — FTP server.
proftpd — ProFTP server daemon.
pureftpd — Pure-FTP server daemon.

Database Service:
mysql — MySQL database server.
postgres — PostgresSQL database service.
postgresql — PostgreSQL database service.