You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an Azure Function that is running in Linux (Consumption plan). I have also enabled SCM_DO_BUILD_DURING_DEPLOYMENT by setting its value to true in my environment variables. The Function app has a dependency on Playwright where it needs to run Chrome browser to do some work. I am deploying the code using Github Actions. Everything works great as far as deployment is concerned however when I run my Function code to invoke Chrome, I am getting EACCES error.
I know that this issue is related to the lack of Execute access. When I check the permissions on all files and folders inside my .local_browsers folder, I see that all folders have 755 permission however all files have 644 permission.
The issue I am running into is no matter what I do, I cannot change the permissions on the files from 644 to 755.
I have the following in my GitHub Action workflow file:
I even added a custom startup script and calling it as prestart script but still the permissions are not changed:
#!/bin/bash
# Define the path
LOCAL_BROWSERS_PATH="/home/site/wwwroot/node_modules/playwright-core/.local-browsers"
# Check if the directory exists
if [ -d "$LOCAL_BROWSERS_PATH" ]; then
# If the file exists, change its permissions
# chmod -R +x "$LOCAL_BROWSERS_PATH"
find "$LOCAL_BROWSERS_PATH" -type d -exec chmod 755 {} \;
find "$LOCAL_BROWSERS_PATH" -type f -exec chmod 755 {} \;
echo "Permissions updated for $LOCAL_BROWSERS_PATH"
else
# If the file doesn't exist, print a message and exit successfully
echo "Chrome executable not found at $LOCAL_BROWSERS_PATH. Skipping permission change."
fi
I am at a complete loss of ideas here as to what I am doing wrong.
+1. I am encountering a similar issue while running "ffmpeg" and "ffprobe" within a Node.js environment. The binary files have only read permissions after the zip deployment (using the Oryx build). This restriction seems to be the sole method for utilizing them in the Flex Plan deployment. Unfortunately, I am unable to chmod the files. However, in the App Service plan, I can employ scm-do-build-during-deployment to acquire the necessary execution permissions for these files. It's quite peculiar.
I have an Azure Function that is running in Linux (Consumption plan). I have also enabled
SCM_DO_BUILD_DURING_DEPLOYMENT
by setting its value totrue
in my environment variables. The Function app has a dependency onPlaywright
where it needs to run Chrome browser to do some work. I am deploying the code using Github Actions. Everything works great as far as deployment is concerned however when I run my Function code to invoke Chrome, I am gettingEACCES
error.Here's my error stack trace:
I know that this issue is related to the lack of
Execute
access. When I check the permissions on all files and folders inside my.local_browsers
folder, I see that all folders have755
permission however all files have644
permission.The issue I am running into is no matter what I do, I cannot change the permissions on the files from
644
to755
.I have the following in my GitHub Action workflow file:
This does not throw any error but it does not change the permission as well.
FWIW, here's my complete workflow:
I even added a custom startup script and calling it as
prestart
script but still the permissions are not changed:I am at a complete loss of ideas here as to what I am doing wrong.
P.S. It is a cross-posting. I originally posted this on StackOverflow a few days ago. Posting it here because I did not get any response there. StackOverflow post can be found here: https://stackoverflow.com/questions/78909340/unable-to-set-execute-permissions-on-files-in-azure-function.
The text was updated successfully, but these errors were encountered: