【发布时间】:2017-10-24 06:00:08
【问题描述】:
我正在尝试在 AWS/EB 上运行创建 TempFile 的 Rails 应用程序。当我在开发中运行时代码可以正常工作,但在生产中它会失败。这是执行的代码:
v_index_file_save = Tempfile.new(['index','.lst'])
我收到以下错误消息:
Errno::EACCES: Permission denied @ dir_s_mkdir - /var/app/current/tmp/1495598860-11267-0001-8597
我发现一个条目建议创建一个预编译脚本来更改我的 /tmp 目录的权限。这是 scipt:
commands:
01_set_tmp_permissions:
command: "chmod 0777 /var/app/current/tmp"
Deploy 看似正常工作,但 /tmp/ 目录上的权限未更新。有什么建议吗??
【问题讨论】:
标签: ruby-on-rails amazon-web-services amazon-elastic-beanstalk