Deleting nouser Files – another CPANEL fault


Not many CPANEL server admin knows that when they delete user account, there are some of those user files that still left on the server. Because user has been deleted, so the files will be owned by nouser.

This can be a problem when your server is highly cycled (you add and delete users very frequently) because you can hit the system user limit. This means you cant create no more user on your system. Deleting user to add another one wont work.

Solution :

You have to remove all files that owned by no user. Usualy they placed on these directories :

  • /home
  • /usr/local/apache/conf/sites
  • /usr/local/frontpage
  • /usr/local/apache/domlogs
  • /var/cpanel/bandwidth
  • /etc/vdomainaliases
  • /var/cpanel/users.cache/
  • /var/cpanel/bwusagecache/
  • /var/spool/cron.suspended/

To find these files is quite easy. Just lunch :

find /usr/local/apache/conf/sites/ \( -nouser -or -nogroup \) -exec rm -f {} \;

find /usr/local/frontpage/ \( -nouser -or -nogroup \) -exec rm -f {} \;

find /usr/local/apache/domlogs/ \( -nouser -or -nogroup \) -exec rm -f {} \;

find /var/cpanel/bandwidth/ \( -nouser -or -nogroup \) -exec rm -f {} \;

find /etc/vdomainaliases/ \( -nouser -or -nogroup \) -exec rm -f {} \;

find /var/cpanel/bwusagecache/ \( -nouser -or -nogroup \) -exec rm -f {} \;

find /var/cpanel/users.cache/ \( -nouser -or -nogroup \) -exec rm -f {} \;

find /var/cpanel/bandwidth.cache/ \( -nouser -or -nogroup \) -exec rm -f {} \;

Note :

-exec rm -f {} \; meaning you execute rm -f to those files. You may change it for example : -exec chown root:root {} \;

Advertisements

About piyecarane

Bla bla bla about me
This entry was posted in CPANEL. Bookmark the permalink.

One Response to Deleting nouser Files – another CPANEL fault

  1. bbennett says:

    Nice tips, very useful for cpanel admins.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s