开发者

Permission error ruby on rails passenger

开发者 https://www.devze.com 2023-04-01 23:17 出处:网络
I can fix the below error by doing chmod -R 777 current (as root). But obviously that is not the way to fix it. The current folder is owned by user cmuench:cmuench. Apache user and group is www-data

I can fix the below error by doing chmod -R 777 current (as root). But obviously that is not the way to fix it. The current folder is owned by user cmuench:cmuench. Apache user and group is www-data

ActionView::Template::Error (Permission denied - /var/www/sites/blastoserver.com/current/public/stylesheets/.permissions_check.68324750.30686.12319):
    5:  <script type="text/javascript">
    6:  function IS(){}
    7:  </script>
    8:   <%= stylesheet_link_tag ['autocomplete.css', 'datepicker.css', 'web.css', 'common.css', 'home.css', 'course.css', 'admin.css'], :cache => true %>
    9:   <%= stylesheet_link_tag [@current_client.name.downcase + '/' + @current_client.name.downcase + '.css'], :cache => false %>
    10:   <%= javascript_include_tag ['jquery.js', 'class.js', 'jquery.extensions.js','nested_form.js','jquery.tablednd.js','jquery.autocomplete.js', 'date.js', 'datepicker.js', 'rails.js', 'common.js', 'navigation.js', 'patient_autocomplete.js', 'courses/course_request.js', 'course_steps/sort_course_steps.js', 'course_steps/next_step.js', 'enrollments/complete_course.js', 'flowplayer/flowplayer.js', 'flowplayer/playlist.js', 'course_steps/video.js', 'course_steps/presentation.js', 'highcharts.js', 'reports/course_assignment.js', 'reports/courses_allocated.js', 'reports/pie开发者_Python百科_chart.js'], :cache => true %>
    11:   <%= csrf_meta_tag %>
  app/views/layouts/application.html.erb:8:in `_app_views_layouts_application_html_erb___225745557_81615570__517096065'


Quoted from the passenger user guide (the apache version, but the nginx one should be the same):

Phusion Passenger will by default run the web application as the owner of the file config/environment.rb (for Rails apps) or config.ru (for Rack apps)

You can override this by setting the PassengerUser directive in either the global configuration file, a virtualhost, a <Directory> block or a <Location> block.

To expand a little bit, I'd only do a chown -R cmuench:cmuench *, which should be enough. Double check the permissions of the public/stylesheets folder, as it looks like the error comes from here.

Hope this helps.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号