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

permission denied open /tmp/instdir/program/libplc4.so #37

Open
matiasbattocchia opened this issue Apr 20, 2021 · 4 comments
Open

permission denied open /tmp/instdir/program/libplc4.so #37

matiasbattocchia opened this issue Apr 20, 2021 · 4 comments

Comments

@matiasbattocchia
Copy link

Using any of these layers / compression methods.

  • arn:aws:lambda:us-east-1:764866452798:layer:libreoffice-brotli:1
  • arn:aws:lambda:us-east-1:764866452798:layer:libreoffice-gzip:1

Lambda logs:

Response
{
  "errorType": "Error",
  "errorMessage": "EACCES: permission denied, open '/tmp/instdir/program/libplc4.so'",
  "trace": [
    "Error: EACCES: permission denied, open '/tmp/instdir/program/libplc4.so'"
  ]
}

Function Logs
START RequestId: ddc1ce12-64b0-4cfd-8336-02e276dbbceb Version: $LATEST
2021-04-20T02:53:36.200Z	ddc1ce12-64b0-4cfd-8336-02e276dbbceb	ERROR	Invoke Error 	{"errorType":"Error","errorMessage":"EACCES: permission denied, open '/tmp/instdir/program/libplc4.so'","code":"EACCES","errno":-13,"syscall":"open","path":"/tmp/instdir/program/libplc4.so","stack":["Error: EACCES: permission denied, open '/tmp/instdir/program/libplc4.so'"]}
END RequestId: ddc1ce12-64b0-4cfd-8336-02e276dbbceb
REPORT RequestId: ddc1ce12-64b0-4cfd-8336-02e276dbbceb	Duration: 4473.39 ms	Billed Duration: 4474 ms	Memory Size: 512 MB	Max Memory Used: 148 MB

Request ID
ddc1ce12-64b0-4cfd-8336-02e276dbbceb
@danielhstahl
Copy link

I get this error as well

@superqd
Copy link

superqd commented Jun 7, 2022

Did anyone ever solve this? I hit this as well. Did you have to call something to change the permissions?

@reneesu99
Copy link

Hi, did anyone ever solve this?

@gitthub89
Copy link

gitthub89 commented Dec 17, 2023

Trying to set the permission might work:

def extract_libreoffice():
        tar_path = '/opt/lo.tar.gz'
        if os.path.exists(tar_path):
            logger.info("Extracting LibreOffice...")
            with tarfile.open(tar_path, 'r:gz') as tar:
                tar.extractall('/tmp')
            **os.chmod('/tmp/instdir', 0o755, follow_symlinks=True)**
            logger.info("Extraction complete.")
        else:
            logger.error("Tar file for LibreOffice not found.")
        libreoffice_extracted = True

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

No branches or pull requests

5 participants