> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://docs.clientexec.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Clientexec Log Rotation

Under full logging level, the log file size can grow very fast. Under common Linux installations the size limit for a file is 2 Gigabytes. When the log file attains that size, CE will get locked.

To deal with this situation you can have the log be automatically rotated with Linux's _logrotate _utility.

Setting this up is dead-simple. Create a file called "clientexec", located under /etc/logrotate.d/ with the following contents:

```html
# Logrotate file for ClientExec
/location/of/your/logfile {
        size=1500M
        rotate 5
        compress
        notifempty
        create 0666 nobody nobody
}
```

Replace the location of your log file, and tune the rest of the settings. In this example, the log will be rotated every time it reaches a size of 1500 Megabytes, keeping the last 5 log files compressed. The fresh empty log files will be created with the permissions bitmask 666, with the username and group nobody.