Can’t upload files to issues

OK, you migrated/installed Redmine and everything seems working fine until you try to upload a file to an issue. Suddenly you get an error.

This error can be caused by different reasons:

Redmine settings limitation

In Administration > Settings > Files there is an option called “Maximum attachment size”. Your file could be heavier than this setting is indicating.

Besides check if your file type is not included in the allowed extensions or is actually disallowed (option “Disallowed extensions”).

Webserver limitation

The web server you are using to run Redmine could also have file size limitations.

If you use Nginx as web server, open the following file: /etc/nginx/nginx.conf

and check if there is any file size restriction. You should see a line like this

client_max_body_size 2M;

If you change the value, remember to restart the server.

If you use Apache as web server, locate the following file: [...]/apache2/conf/httpd.conf, open it and check if there is any file restriction. You should see a line like this

LimitRequestBody 51200000

If you change the value, remember to restart the server.

Files folder's wrong owner or permissions

It could also happen that owner or permissions for […]/files/ folder could have changed while migrating Redmine. You have to

  • connect via SSH to the server
  • permissions for /files/ folder should be recurrently set to “0775”
  • owner should be the same as for the rest of the installation

After changing any value, you should restart your web server.

About The Author

Leave a Comment

Your email address will not be published. Required fields are marked *