Clear DirectAdmin Message system

Update 21-07-2013: based on the comments of this post, I’ve added an additional step to restore the rights of the file.

DirectAdmin contains a message system which contains information about thing like brute force attacks, overusage, etc. The message system get really full pretty fast and could contain thousands of messages.

To prevent brute force attacks, disable logging in with a password and use SSH keys.

Unfortunately DirectAdmin lacks the feature to clear the message system at once. With a lot of messages clearing the message system manually isn’t an option. Luckily it’s possible to to clear the message system from CLI.

  1. Open a shell to the server and login.
  2. The messages are stored as single files for every message in: /usr/local/directadmin/data/tickets
  3. Remove all (sub)directories and files in this folder with: rm -rf *
  4. DirectAdmin also tracks a list of the files, which needs to be cleaned too. Navigate to the directory: cd /usr/local/directadmin/data/admin/
  5. Remove the tickets.list file: rm tickets.list
  6. Recreate the file, as DirectAdmin expects the file to exist: touch tickets.list
  7. Set the correct owner of the file: chown directadmin:directadmin tickets.list
  8. Set the correct rights of the file: chmod 600 tickets.list

The message system is completely empty now.

4 thoughts on “Clear DirectAdmin Message system”

  1. Hi,

    This is a good tutorial about deleting all the messages in the message system. Only, when you recreate the file with “touch”, it doesn’t have the correct permissions.

    After touching the file, you can correct the permissions with the commands:
    chown diradmin:diradmin tickets.list
    chmod 600 tickets.list

    Hope this helps some administrators.

    1. You’re right. I’ve added you suggestion to the tutorial! Thanks for your reply!

Comments are closed.