AWS CodeDeploy复制权限 [英] AWS CodeDeploy Duplicate permission

查看:62
本文介绍了AWS CodeDeploy复制权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在我的appspec.yml文件中设置权限,但是在运行部署时,我不断收到有关重复权限设置的错误

I'm trying to set permissions in my appspec.yml file, but I keep getting an error about duplicate permission settings when I run a deployment

重复的权限设置说明/data/html/httpdocs/artisan

Duplicate permission setting instructions for /data/html/httpdocs/artisan

当前(除了列表格式外),根据

This is currently (with except in list format) how the permission object is configured in my appspec.yml, per this threads recommendation . I actually have multiple files I want different permissions on, but I can't seem to get it to work w/ just one file? what is the correct way?

permissions:
  - object: /data/html/httpdocs/ 
    pattern: "**"
    except: [/data/html/httpdocs/artisan]
    owner: ubuntu
    group: www-data
    mode: 644
    type:
      - file
  - object: /data/html/httpdocs/artisan
    owner: ubuntu
    group: www-data
    mode: 755
    type:
      - file

推荐答案

我遇到了一个类似的问题,最终不得不深入研究codedeploy-agent源代码.

I just ran in to a similar issue and I ended up having to dig in to the codedeploy-agent source code.

CodeDeploy权限的(记录薄弱的除外)选项当前接受一组相对文件名.您应该能够像这样匹配您的工匠文件:

The (poorly documented) except option for the CodeDeploy permissions currently accepts an array of relative filenames. You should be able to match your artisan file like this:

  permissions:
  - object: /data/html/httpdocs/ 
    pattern: "**"
    except: [artisan]
    owner: ubuntu
    group: www-data
    mode: 644
    type:
      - file
  - object: /data/html/httpdocs/artisan
    owner: ubuntu
    group: www-data
    mode: 755
    type:
      - file

请注意,这不适用于文件夹或嵌套在文件夹中的文件.您可以使用通配符,但通配符只会匹配该对象的根目录的例外.

Note that this will not work for folders or files nested within folders. You can use wildcards, but they will only match exceptions for the root directory of that object.

因此,我不得不将某些脚本从子文件夹移动到根目录.

I had to move some of my scripts from a subfolder to the root because of this.

这是一个链接到相关事件代码部署代理代码.

Here's a link to the relevent codedeploy-agent code.

这篇关于AWS CodeDeploy复制权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆