Codedeploy permissions issue

0

Hello,

This is my app structure
--my-app
|--bin
| |--console
| |--phpunit
|--var
|--src
|----file1
|----file2

I want to set permissions to all folder to be 755 with user www-data and all files to 644 with user www-data except /bin/console and /bin/phpunit which need to be 744
I've tried almost everything from https://docs.aws.amazon.com/codedeploy/latest/userguide/reference-appspec-file-structure-permissions.html
and always end up with duplicated permissions.
What am i doing wrong?

permissions:

  • object: /var/www/testl/
    owner: www-data
    group: www-data
    mode : 644
    type:
    • file
  • object: /var/www/test
    owner: www-data
    group: www-data
    mode: 755
    type:
    • directory
  • object: /var/www/test/bin
    owner: www-data
    group: www-data
    mode : 744
    type:
    • file

Edited by: thedoole on Apr 24, 2019 5:14 AM

asked 5 years ago559 views
1 Answer
0

I've solved it like this:

permissions:

  • object: /var/www/test
    pattern: "*"
    owner: www-data
    group: www-data
    mode : 644
    type:
    • file
  • object: /var/www/test
    owner: www-data
    group: www-data
    mode : 755
    type:
    • directory
  • object: /var/www/test/bin
    owner: www-data
    group: www-data
    mode : 744
    type:
    • file
  • object: /var/www/test/config
    owner: www-data
    group: www-data
    mode : 644
    type:
    • file
  • object: /var/www/test/public
    owner: www-data
    group: www-data
    mode : 644
    type:
    • file
  • object: /var/www/test/src
    owner: www-data
    group: www-data
    mode : 644
    type:
    • file
  • object: /var/www/test/vendor
    owner: www-data
    group: www-data
    mode : 644
    type:
    • file
  • object: /var/www/test/var
    owner: www-data
    group: www-data
    mode : 644
    type:
    • file

Pattern "*" is not documented at all.

answered 5 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions