无法访问生产中的日志文件

编程入门 行业动态 更新时间:2024-10-28 18:33:47
本文介绍了无法访问生产中的日志文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我试图运行我的应用程序,并在production.log上检查一些输出.但是 Ruby on Rails 会引发此错误. Apache日志

I was trying to run my application and check for some output on the production.log. However Ruby on Rails throws this error. Apache log

Rails Error: Unable to access log file. Please ensure that /var/www/somefolder/someapp/log/production.log exists and is chmod 0666. The log level has been raised to WARN and the output directed to STDERR until the problem is fixed.

我已经执行了必要的chmod 666 production.log以使其正常运行,但是我意识到该文件处于root访问权限.

I have performed the necessary chmod 666 production.log to make it work but I realized that the file is under root access.

所以我的文件权限是

-rw-rw-rw- 1 root root 20845 2010-03-18 01:18 production.log

我不确定如何允许Ruby on Rails访问此文件.我刚开始管理Linux生产环境,所以请您原谅我的无知.

I'm not sure how to allow Ruby on Rails to access this file. I'm fairly new to managing a Linux production environment so I request you to excuse my ignorance.

推荐答案

我认为您需要将用户和production.log组更改为在以下用户和组Rails下运行的任何用户和组: .

I think you need to change the user and group of production.log to whatever user and group Rails (i.e. Passenger or Mongrel or whatever you are using) runs under.

更多推荐

无法访问生产中的日志文件

本文发布于:2023-06-03 02:46:19,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/466292.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:无法访问   文件   日志

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!