Skip to content

Permission Denied and File Too Short errors for git and ssh #3

@yevk

Description

@yevk

Running git in lambda, I get /bin/sh: /opt/bin/git: Permission denied.

Using docker run to get interactive shell, I get the same error trying to run git: sh: /opt/bin/git: Permission denied.
The problem seems to be the lack of execution permission on files in /opt/bin:
-rw-rw-rw- 1 sbx_user1051 495 2480144 Dec 24 20:24 git
-rw-rw-rw- 1 sbx_user1051 495 658056 Dec 24 20:24 ssh

Granting permission using chmod +x /opt/bin/* fixes this problem.
But, ssh still doesn't work due to another error: ssh: error while loading shared libraries: /opt/lib/libfipscheck.so.1: file too short, not sure why.

I tested this on an image created and cached by AWS SAM CLI after attempting to locally invoke the lambda.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions