Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option "include" in manifest.yml file does not preserve files permission #1158

Open
DenisMedeiros opened this issue Apr 6, 2023 · 0 comments

Comments

@DenisMedeiros
Copy link

DenisMedeiros commented Apr 6, 2023

Hi all,

We are facing an issue when using the option include in the manifest.yml file, where the permissions of the included files are not preserved.

Our manifest.yaml file looks like:

packages:
  poc:
    actions:
      example:
        annotations:
          web-export: true
        function: src/example
        include:
          - ["tls"]
          - ["virtualenv"]
          - ["requirements.txt"]
        inputs: {}
        runtime: python:3.9
        version: 1.0.0
        web: true
    version: 1.0.0

Inside of the directly tls, we have some TLS certificates that are used by PostgreSQL, and the private key must have the limited permissions (600 if owned by a regular user, or 640 is owned by root - reference). In our local environment, the files have the permissions set properly:

-rw-------  1 denis  test  1703 Apr  5 16:30 tls/client-tls.key

However, once it's deployed, the TLS files are copied with broader access (644) and then the PostgreSQL connection fails complaining about the permissions.

Is there a way to include these files and also keeping the existing permissions? A workaround so far is to make the Python code to fix the files permissions but ideally it would be nice if this could be fixed during deployment (rather than in each function run).

Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant