Opened 6 years ago

Closed 5 years ago

#7524 closed Bug/Something is broken (fixed)

after roundcube upgrade mx1 users cannot attach files

Reported by: https://id.mayfirst.org/erq Owned by: https://id.mayfirst.org/jamie
Priority: Urgent Component: Tech
Keywords: mx1 roundcube-upgrade Cc: geaedicion@…, flapina@…
Sensitive: no

Description

Jamie, hi System responds after choosing the file: "an error occurred!. File upload failed." Could this be a permissions error? Thanks a lot for help Enrique

Change History (6)

comment:1 Changed 6 years ago by https://id.mayfirst.org/erq

  • Owner set to https://id.mayfirst.org/jamie
  • Status changed from new to assigned

comment:2 Changed 6 years ago by https://id.mayfirst.org/erq

Jamie. It looks like there is the same kind of issue when trying to save drafts. Thanks again.

comment:3 Changed 6 years ago by https://id.mayfirst.org/jamie

Thanks for the report.

I checked /etc/apache2/sites-enabled/vhcs2.conf, searching for "webmail" to find out what file is the apache error log. That told me that the file in use is: /var/log/apache2/users/webmail.laneta.apc.org-error.log.

I then scanned that file. I found this error:

Fri Jul 05 03:34:02 2013] [error] [client xxx.xxx.xxx.xxx] PHP Warning:  Error writing to log file /var/www/virtual/laneta.apc.org/webmail/htdocs/logs/errors; Please check permissions in /var/www/virtual/laneta.apc.org/webmail/htdocs/program/include/rcube.php on line 1057, referer: http://webmail.laneta.apc.org/?_task=mail&_id=xxxxxxxxxxxxxxxxxx&_action=compose

Which I don't think is the cause of this problem, but I changed the group and permissions on /var/www/virtual/laneta.apc.org/webmail/htdocs/logs anyway to avoid this in the future:

chgrp www-data/var/www/virtual/laneta.apc.org/webmail/htdocs/logs/
chmod 775 /var/www/virtual/laneta.apc.org/webmail/htdocs/logs/

Then I found the error that was more informative:

[Fri Jul 05 03:34:50 2013] [error] [client xxx.xxx.xxx.xxx] PHP Warning:  move_uploaded_file() [<a href='function.move-uploaded-file'>function.move-uploaded-file</a>]: open_basedir restriction in effect. File(/tmp/rcmAttmntFdrEbN) is not within the allowed path(s): (/var/www/virtual/laneta.apc.org/webmail:/var/www/virtual/laneta.apc.org/webmail/phptmp:/usr/share/php) in /var/www/virtual/laneta.apc.org/webmail/htdocs/plugins/filesystem_attachments/filesystem_attachments.php on line 59, referer: http://webmail.laneta.apc.org/?_task=mail&_id=xxxxxxxxxxxxxxxxxxx&_action=compose

It seems as though there is an open_basedir restriction in place. I resolved the problem by adding the following configuration item to config/main.inc.php:

$rcmail_config['temp_dir'] = '/var/www/virtual/laneta.apc.org/webmail/phptmp';

I also cleaned up that directory, which had tmp files that were many years old, with:

0 mx1:/var/www/virtual/laneta.apc.org/webmail/phptmp# find . -mtime +30 -exec rm '{}' \;
0 mx1:/var/www/virtual/laneta.apc.org/webmail/phptmp#

Can you try again?

comment:4 Changed 5 years ago by https://id.mayfirst.org/dskallman

Hey Enrique & Jamie,

Is there an update on this?

Dana

comment:5 Changed 5 years ago by https://id.mayfirst.org/jamie

  • Resolution set to fixed
  • Status changed from assigned to feedback

I think this is done so setting to feedback state. Please re-open if we still can't attach files.

comment:6 Changed 5 years ago by automatic

  • Status changed from feedback to closed

No news is good news (we hope)! Given the lack of feedback, we think this ticket can be closed.

Please login to add comments to this ticket.

Note: See TracTickets for help on using tickets.