简体   繁体   English

独角兽说:“打开文件读取错误:权限被拒绝”

[英]Unicorn says “Error opening file for reading: Permission denied”

I'm running a rails 3 application running on unicorn, every now and then I get this message: 我不时地运行在独角兽上运行的Rails 3应用程序,然后我得到以下消息:

Error opening file for reading: Permission denied 打开文件以供读取时出错:权限被拒绝

and that's it. 就是这样。 I don't know what file or what component is trying to opening it. 我不知道哪个文件或哪个组件正在尝试打开它。 It doesn't happen on each request or any other external event that I can figure out. 我不会发现,它不会在每个请求或任何其他外部事件上发生。

Any ideas what might be going on or how to try to figure it out? 有什么想法可能会发生什么或如何设法解决?

I tried searching for "Error opening file for reading" on all the gems I'm using, with no luck. 我尝试在所有使用的宝石上搜索“打开文件读取错误”,但是没有运气。

I started seeing this from time to time in Passenger logs after upgrading to ubuntu 12.04. 升级到ubuntu 12.04后,我不时在旅客日志中看到这种情况。 I narrowed it down to some image processing and it apparently comes from Ubuntu's patches to libjpeg-turbo library. 我将其范围缩小到一些图像处理,并且显然来自Ubuntu的libjpeg-turbo库补丁。

It is trying to access /proc/self/auxv to determine some system capabilities, but that proc file seems not to be always readable, presumably after a process setuid()s to another user when dropping privileges. 它正在尝试访问/proc/self/auxv来确定某些系统功能,但是该proc文件似乎并不总是可读的,大概是在进程setuid()对另一个用户进行特权删除时。

As far as I can tell, the library works even if that fails, so it shouldn't cause any major issues. 据我所知,即使失败,该库也可以正常工作,因此不会造成任何重大问题。

There seems to be a related bug report at https://bugs.launchpad.net/ubuntu/+source/virtualbox/+bug/1014487 似乎在https://bugs.launchpad.net/ubuntu/+source/virtualbox/+bug/1014487有相关的错误报告

I started running following command in Ubuntu 12.04 我开始在Ubuntu 12.04中运行以下命令

sudo apt-get update

after running above command, the "Error opening file for reading: Permission denied" was solved. 运行上述命令后,“打开文件读取错误:权限被拒绝”得到解决。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM