zoukankan      html  css  js  c++  java
  • cache目录没有权限

    今天部署了新服务器发现cache目录没有权限,

    App 26772 stderr: Started GET "/investors" for 103.238.226.130 at 2015-08-25 11:25:47 +0800
    App 26772 stderr: Processing by InvestorsController#index as HTML
    App 26772 stderr: Read fragment views/investors/1-20150825032428475102000/zh-CN/ba9ec9f1a927c00438fab3e53de969e8 (0.2ms)
    App 26772 stderr: Write fragment views/investors/1-20150825032428475102000/zh-CN/ba9ec9f1a927c00438fab3e53de969e8 (0.8ms)
    App 26772 stderr:   Rendered investors/_investor.html.slim (3.8ms)
    App 26772 stderr:   Rendered investors/index.html.slim within layouts/application (10.1ms)
    App 26772 stderr: Completed 500 Internal Server Error in 13ms
    App 26772 stderr: 
    App 26772 stderr: ActionView::Template::Error (Permission denied - /home/ubuntu/campo/releases/20150824101227/tmp/cache/84B):
    App 26772 stderr:     1: - cache [investor, locale] do
    App 26772 stderr:     2:   .investor-frame
    App 26772 stderr:     3:     .investor  id="investor-#{investor.id}"
    App 26772 stderr:     4:       .investor-content
    App 26772 stderr:   app/views/investors/_investor.html.slim:1:in `_app_views_investors__investor_html_slim___4107010476464905044_55536860'
    App 26772 stderr:   app/views/investors/index.html.slim:40:in `_app_views_investors_index_html_slim___256757312322326570_55623180'
    App 26772 stderr: 

    查一下文件夹目录的权限

    # namei -om /home/ubuntu/campo/releases/20150824101227/tmp/cache
    f: /home/ubuntu/campo/releases/20150824101227/tmp/cache
     drwxr-xr-x root   root   /
     drwxr-xr-x root   root   home
     drwxr-xr-x ubuntu ubuntu ubuntu
     drwxr-xr-x root   root   campo
     drwxr-xr-x root   root   releases
     drwxr-xr-x root   root   20150824101227
     drwxr-xr-x root   root   tmp
     lrwxrwxrwx root   root   cache -> /home/ubuntu/campo/shared/tmp/cache
       drwxr-xr-x root   root   /
       drwxr-xr-x root   root   home
       drwxr-xr-x ubuntu ubuntu ubuntu
       drwxr-xr-x root   root   campo
       drwxr-xr-x root   root   shared
       drwxr-xr-x root   root   tmp
       drwxr-xr-x root   root   cache

    网上看了一下没有太好的方法,只能先修改下权限了

    # chmod 777 /home/ubuntu/campo/shared/tmp/cache/
  • 相关阅读:
    Linux 下安装配置 JDK7
    win7下virtualbox装linux共享win7文件问题(已测试可用)
    Linix常用命令
    JAVA命令大全
    virtualbox 不能为虚拟电脑打开一个新任务/VT-x features locked or unavailable in MSR.
    VirtualBox下安装rhel5.5 linux系统
    redhat RHEL 5.5 下载地址
    ios开发@selector的函数如何传参数/如何传递多个参数
    U盘10分钟安装linux系统
    史上最浅显易懂的Git分布式版本控制系统教程
  • 原文地址:https://www.cnblogs.com/iwangzheng/p/4758012.html
Copyright © 2011-2022 走看看