简体   繁体   English

Ruby on Rails:Errno :: EACCES(权限被拒绝-oo_26502

[英]Ruby on Rails : Errno::EACCES (Permission denied - oo_26502

I have a Rails app running under Apache/passenger, the user uploads a file, the file is written to /tmp, then the app tries to read the same file, and returns the above error. 我有一个在Apache / passenger下运行的Rails应用程序,用户上传一个文件,将该文件写入/ tmp,然后该应用程序尝试读取相同的文件,并返回上述错误。

/tmp has these permissions / tmp具有这些权限

drwxrwxrwt 7 root root 4096 Feb 28 16:25 tmp drwxrwxrwt 7根根4096 2月28日16:25 tmp

and the file written in /tmp is owned by "app" 而用/ tmp编写的文件归“ app”所有

-rw-r--r-- 1 app www 74359 Feb 28 15:07 filename.xlsx -rw-r--r-- 1个应用程序www 74359 2月28日15:07 filename.xlsx

Why am I getting this error? 为什么会出现此错误?

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

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