Symptoms
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
Description
Not being able to attach files in RoundCube can be caused by incorrect ownership or permissions on the /var/cpanel/userhomes/cpanelroundcube/tmp directory.
The issue can also be caused by issues with /tmp or /var/tmp, such as permissions, ownership, or running out of disk space or inodes.
Another potential reason is the users tmp folder inside of their home folder may have incorrect permissions, or ownership.
Workaround
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
Change the ownership and permissions on /tmp to the correct ownership and permissions:
chown root: /tmp
chmod 1777 /tmp
Change the owner and permission on tmp inside the user's home directory, replacing "$user" with the actual cPanel user.
chown $user. /home/$username/tmp
chmod 0755 /home/$username/tmp/
Comments
0 comments
Article is closed for comments.