Attaching files to email in RoundCube will fail with the following error.
An error occurred!
File upload failed.
The cPanel error log will have an error like the following.
[2021-05-19 03:55:29 -0400] info [webmaild] [fcgi] PHP message: PHP Warning: File upload error - unable to create a temporary file in Unknown on line 0
This can be caused by incorrect ownership or permissions on the /var/cpanel/userhomes/cpanelroundcube/tmp directory.
Change /var/cpanel/userhomes/cpanelroundcube/tmp to the correct ownership and permissions:
chown cpanelroundcube.cpanelroundcube /var/cpanel/userhomes/cpanelroundcube/tmp
chmod 700 /var/cpanel/userhomes/cpanelroundcube/tmp