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.
- Open a shell to the server and login.
- The messages are stored as single files for every message in:
/usr/local/directadmin/data/tickets
- Remove all (sub)directories and files in this folder with:
rm -rf *
- DirectAdmin also tracks a list of the files, which needs to be cleaned too. Navigate to the directory:
cd /usr/local/directadmin/data/admin/
- Remove the
tickets.list
file:rm tickets.list
- Recreate the file, as DirectAdmin expects the file to exist:
touch tickets.list
- Set the correct owner of the file:
chown directadmin:directadmin tickets.list
- Set the correct rights of the file:
chmod 600 tickets.list
The message system is completely empty now.
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.
You’re right. I’ve added you suggestion to the tutorial! Thanks for your reply!
I created an auto cleanup script with archive option with the goal to preserve x days of the message and the archive or delere the rest…
Check it out @ http://forum.directadmin.com/showthread.php?t=48021
It looks nice, I will give it a try!