---
title: How to fix CWP RoundCube Internal Server Error
description: "You may get \"Internal Server Error\" when accessing your emails on CWP. In this guide, we will look at potential fixes for this error. We may get the cause(s) of this error by looking at the error logs mainly concerned…"
url: "https://truehost.com/support/knowledge-base/cwp-roundcube-internal-server-error/"
updated: "2024-09-20"
category: CWP Panel
---

# How to fix CWP RoundCube Internal Server Error

You may get "Internal Server Error" when accessing your emails on CWP. In this guide, we will look at potential fixes for this error.

We may get the cause(s) of this error by looking at the error logs mainly concerned with emails and RoundCube.

Run the following commands to read the logs on the VPS via SSH terminal:

`tail /usr/local/cwpsrv/var/services/roundcube/logs/errors.log`

![](https://truehost.com/support/wp-content/uploads/2024/09/image-91.png)

`tail /var/log/dovecot.log`

![](https://truehost.com/support/wp-content/uploads/2024/09/image-92-1024x129.png)

**Updates**

Ensure you have the latest version of CWP and RoundCube.

Run the following script to update CWP:

`sh /scripts/update_cwp`

![](https://truehost.com/support/wp-content/uploads/2024/09/image-93.png)

Run the following script to update RoundCube:

`sh /scripts/mail_roundcube_update`

![](https://truehost.com/support/wp-content/uploads/2024/09/image-94.png)

Reboot the server after updating RoundCube and CWP.

**Permissions**

RoundCube may be lacking sufficient permissions to read and write email files and folders.

Run this command to fix the mail permissions:

`sh /scripts/cwp_api account mail_fix_permissions`

Check and see if the issue has been fixed after running the above command.

To fix the email files and folders permissions and ownership, execute the following commands:

```
chown vmail.mail /var/vmail
chmod 770 /var/vmail
```

These are the potential fixes to the error. Always check the error log to get the cause of the problem as it will guide you on how to fix it.
