500 error on My Accounts and Settings

Added by v d about 8 years ago

Environment:
  Redmine version                          2.3.1.stable
  Ruby version                             1.9.3 (i686-linux)
  Rails version                            3.2.13
  Environment                              production
  Database adapter                         Mysql2
Redmine plugins:
  no plugin installed

Message in production Log

ActionView::Template::Error (Permission denied - /usr/share/redmine/tmp/cache/900):
    16:   <p><%= f.text_field :firstname, :required => true %></p>
    17:   <p><%= f.text_field :lastname, :required => true %></p>
    18:   <p><%= f.text_field :mail, :required => true %></p>
    19:   <p><%= f.select :language, lang_options_for_select %></p>
    20:   <% if Setting.openid? %>
    21:   <p><%= f.text_field :identity_url  %></p>
    22:   <% end %>
  lib/redmine/i18n.rb:95:in `languages_options'
  app/helpers/application_helper.rb:933:in `lang_options_for_select'
  app/views/my/account.html.erb:19:in `block in _app_views_my_account_html_erb__296419113_81320430'
  app/helpers/application_helper.rb:948:in `labelled_form_for'
  app/views/my/account.html.erb:9:in `_app_views_my_account_html_erb__296419113_81320430'

Yes I have done this http://www.redmine.org/projects/redmine/wiki/RedmineInstall#Step-8-File-system-permissions

The folders are set to 755.

There is nothing inside /usr/share/redmine/tmp/cache/900. I seems like it cannot write to that folder.

Replies (4)

RE: 500 error on My Accounts and Settings - Added by Jan Niggemann (redmine.org team member) about 8 years ago

Can you please set the permissions of /usr/share/redmine/tmp to 777 temporarily and re-check?

RE: 500 error on My Accounts and Settings - Added by v d about 8 years ago

Hi Jan,

Funny thing is I actually did try that as well and it didn't work the first time but I just did it again and it works.

Is it wise to keep it at 777?

My issues page is still displaying the 500 error but that could be something else. I'll have a look at the logs

Thanks

RE: 500 error on My Accounts and Settings - Added by Jan Niggemann (redmine.org team member) about 8 years ago

This usually means that your webserver, rails or your application server (passenger, thin, ...) run as a different which can't write to the specified directory.
Change ownership of that directory to the correct user and reset permissions to 755.

RE: 500 error on My Accounts and Settings - Added by Mathieu f almost 3 years ago

Hi,

I have kind of the same problem, can't access to My accounts and Settings, and the plugins "Redmine workload plugin" and "Issue Charts plugin".

Environment:
Redmine version 3.4.6.stable.17405
Ruby version 2.4.1-p111 (2017-03-22) [x86_64-linux]
Rails version 4.2.8
Environment production
Database adapter Mysql2
SCM:
Subversion 1.9.3
Git 2.7.4
Filesystem
Redmine plugins:
additionals 2.0.12
clipboard_image_paste 1.12
contracts 2.4
issue_charts 1.3.0
periodictask 3.2.1
redmine_agile 1.4.6
redmine_banner 0.1.2
redmine_checklists 3.1.11
redmine_ckeditor 1.1.5
redmine_contacts 4.1.2
redmine_issue_evm 4.0
redmine_issue_templates 0.2.0
redmine_lightbox2 0.4.3
redmine_local_avatars 1.0.3
redmine_mail_from 1.3.0
redmine_meeting_room_calendar 3.0.0
redmine_people 1.3.2
redmine_shady 0.6.0
redmine_show_issue_assignee_avatar 0.0.1
redmine_spent_time_required 0.0.1
redmine_work_time 0.3.4
redmine_workload 1.1.0
redmine_xlsx_format_issue_exporter 0.1.5

Message in production Log when trying to access to Settings:

App 18840 stderr: ActionView::Template::Error (Permission denied @ dir_s_mkdir - /opt/redmine/redmine-3.4/tmp/cache/E6E):
App 18840 stderr: 3: <div class="box tabular settings">
App 18840 stderr: 4: <p><%= setting_select :ui_theme, Redmine::Themes.themes.collect {|t| [t.name, t.id]}, :blank => :label_default, :label => :label_theme ></p>
App 18840 stderr: 5:
App 18840 stderr: 6: <p><
= setting_select :default_language, lang_options_for_select(false) ></p>
App 18840 stderr: 7:
App 18840 stderr: 8: <p><
= setting_check_box :force_default_language_for_anonymous %></p>
App 18840 stderr: 9:
App 18840 stderr: lib/redmine/i18n.rb:125:in `languages_options'
App 18840 stderr: app/helpers/application_helper.rb:1180:in `lang_options_for_select'
App 18840 stderr: app/views/settings/_display.html.erb:6:in `block in _cfc570956dc34be36915b7abecb6c3af'
App 18840 stderr: app/views/settings/_display.html.erb:1:in `_cfc570956dc34be36915b7abecb6c3af'
App 18840 stderr: app/views/common/_tabs.html.erb:17:in `block in _fa202a7d528673280d242db69ddb1b42'
App 18840 stderr: app/views/common/_tabs.html.erb:16:in `each'
App 18840 stderr: app/views/common/_tabs.html.erb:16:in `_fa202a7d528673280d242db69ddb1b42'
App 18840 stderr: app/helpers/application_helper.rb:345:in `render_tabs'
App 18840 stderr: app/views/settings/edit.html.erb:5:in `_0b848eaea00cac0fd57cce9f000becd9'
App 18840 stderr: app/controllers/settings_controller.rb:31:in `index'
App 18840 stderr: lib/redmine/sudo_mode.rb:63:in `sudo_mode'

(1-4/4)