1

我正在尝试使用 CodeDeploy 将应用程序部署到 EC2 上,但遇到以下错误

/var/www/html/storage/framework 的重复权限设置说明

我的 appspec.yml 如下

version: 0.0
os: linux
files:
 - source: /
   destination: /var/www/html

permissions:
  - object: /var/www/html
    owner: apache
    group: apache
    mode: 644
    except:
      - storage/*
    type:
      - directory
  - object: /var/www/html/storage
    owner: apache
    group: apache
    mode: 777
    type:
      - directory

我尝试了各种格式,except包括

  • 显式列出相对路径

    except:
     - storage
     - storage/app
     - storage/logs
     - storage/framework
     - storage/framework/views
     - storage/framework/cache
     - storage/framework/sessions
    
  • 使用通配符

    except:
     - storage/*
    
  • 仅使用文件夹名称

    except:
     - storage
    

这些似乎都无法解决问题。

类似问题

4

1 回答 1

0

The except option needs to be specified as an array. (Use [] not a nested list)

You can see it in the permissions examples in the appspec reference guide (scroll down a little): http://docs.aws.amazon.com/codedeploy/latest/userguide/app-spec-ref.html#app-spec-ref-permissions

于 2015-12-23T19:19:17.953 回答