首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >EACCES (权限被拒绝@ ElasticBeanStalk上的rb_sysopen

EACCES (权限被拒绝@ ElasticBeanStalk上的rb_sysopen
EN

Stack Overflow用户
提问于 2018-01-31 15:20:03
回答 1查看 1K关注 0票数 2

我有一个试图写一些文件的Rails ActiveJob。当控制器调用权限时,它会失败,并返回上述错误,尝试按如下方式写入文件:Errno::/home/ec2-user/scrubarea/landing/5mBs8mq85ZFKVnqijeKZuNuh). (Permission denied @ rb_sysopen -EACCES

即使目录拥有777个权限,也会发生这种情况。

但是,如果我通过ssh进入EC2映像,访问Rails控制台,并使用perform_now运行作业,它就能正常工作。

是否有其他AWS安全机制不允许应用程序写入文件?

EN

回答 1

Stack Overflow用户

发布于 2018-02-02 11:46:27

代码语言:javascript
运行
复制
commands:
  01_set_scrubarea:
    command: mkdir /var/tmp/scrubarea
    ignoreErrors: true
  05_set_landing:
    command: mkdir /var/tmp/scrubarea/cleanpool
    ignoreErrors: true
  10_set_cleanpool:
    command: mkdir /var/tmp/scrubarea/landing
    ignoreErrors: true
  15_change_security_scrubarea:
    command: chmod 775 /var/tmp/scrubarea
  17_change_security_cleanpool:
    command: chmod 775 /var/tmp/scrubarea/cleanpool
  19_change_security_landing:
    command: chmod 775 /var/tmp/scrubarea/landing
  20_change_owner:
    command: chown --verbose --recursive ec2-user:ec2-user /var/tmp/scrubarea
  25_add_to_group:
    command: usermod -a -G ec2-user webapp
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/48536610

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档