Cannot attach files in Roundcube

Created:

2016-12-12 03:43:52 UTC

Modified:

2017-08-08 13:12:45 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Cannot attach files in Roundcube

Applicable to:

  • Plesk 12.5 for Linux

Symptoms

  • Error during attaching a file in test@example.com mailbox:

    An error occurred!
    File upload failed
  • A subdomain webmail.example.com is created in Plesk and it has custom RoundCube installation.

  • RoundCube webmail is disabled on example.com domain in Home > Subscriptions > example.com > Websites & Domains > Mail Settings tab, it set to None

  • An error is logged in /var/www/vhosts/system/webmail.example.com/logs/error_log :

    [Wed Nov 09 17:03:58 2016] [warn] [client 91.204.25.4] mod_fcgid: stderr: PHP Warning:  realpath(): open_basedir restriction in effect. File(/var/log/plesk-roundcube) is not within the allowed path(s): (/var/www/vhosts/example.com/:/tmp/) in /var/www/vhosts/pc-q.co.uk/webmail.example.com/program/lib/Roundcube/rcube_config.php on line 139, referer: http://webmail.example.com/?_task=mail&_id=86165030258234e36a611c&_action=compose
    [Wed Nov 09 17:03:58 2016] [warn] [client 91.204.25.4] mod_fcgid: stderr: PHP Warning: realpath(): open_basedir restriction in effect. File(/var/tmp/plesk-roundcube) is not within the allowed path(s): (/var/www/vhosts/example.com/:/tmp/) in /var/www/vhosts/example.com/webmail.example.com/program/lib/Roundcube/rcube_config.php on line 140, referer: http://webmail.example.com/?_task=mail&_id=86165030258234e36a611c&_action=compose
    [Wed Nov 09 17:03:58 2016] [warn] [client 91.204.25.4] mod_fcgid: stderr: PHP Warning: tempnam(): open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/vhosts/example.com/:/tmp/) in /var/www/vhosts/example.com/webmail.example.com/plugins/filesystem_attachments/filesystem_attachments.php on line 57, referer: http://webmail.pc-q.co.uk/?_task=mail&_id=86165030258234e36a611c&_action=compose
    [Wed Nov 09 17:03:58 2016] [warn] [client 91.204.25.4] mod_fcgid: stderr: PHP Warning: move_uploaded_file(): open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/vhosts/example.com/:/tmp/) in /var/www/vhosts/example.com/webmail.example.com/plugins/filesystem_attachments/filesystem_attachments.php on line 59, referer: http://webmail.example.com/?_task=mail&_id=86165030258234e36a611c&_action=compose

Cause

open_basedir PHP option prevents uploading.

Resolution

  1. Use webmail provided by Plesk - this is recommended way:

  2. Remove webmail.example.com subdomain.

  3. Follow this Guide to enable webmail for a domains - https://docs.plesk.com/en-US/17.0/administrator-guide/website-management/mail-settings/mail-settings-of-domains.73389/

OR

  1. Set open_basedir PHP option to None at Home > Domains > example.com > PHP settings
Have more questions? Submit a request
Please sign in to leave a comment.